From 665d533c40e7a45845494f4cbf8e4b9a0036b5b4 Mon Sep 17 00:00:00 2001 From: chou86_e Date: Sun, 14 Sep 2008 03:51:48 +0000 Subject: [PATCH] fix to previous edit color update git-svn-id: https://svn.code.sf.net/p/ucblogo/code@205 fc4ef4ee-df3e-0410-84de-fb01f5d6c4f7 --- TextEditor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TextEditor.cpp b/TextEditor.cpp index b1f4f493..21eb2cd4 100644 --- a/TextEditor.cpp +++ b/TextEditor.cpp @@ -56,9 +56,12 @@ void TextEditor::SetFont(wxFont font){ } void TextEditor::SetThisFont(wxCommandEvent& event) { - SetDefaultStyle(wxTextAttr(wxNullColour,wxNullColour, this->font)); + SetDefaultStyle(wxTextAttr(TurtleCanvas::colors[wxTerminal::terminal->m_curFG], + TurtleCanvas::colors[wxTerminal::terminal->m_curBG], this->font)); if(this->IsShown()){ - SetStyle(0,GetLastPosition(), wxTextAttr(wxNullColour,wxNullColour,this->font)); + SetStyle(0,GetLastPosition(), + wxTextAttr(TurtleCanvas::colors[wxTerminal::terminal->m_curFG], + TurtleCanvas::colors[wxTerminal::terminal->m_curBG],this->font)); Refresh(); Update(); }