From 74b4e0323441ba47c713386382ecb8716171c32c Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Thu, 1 Nov 2007 04:49:32 +0000 Subject: [PATCH] track tool select redraw when highlight is active bug fix --- change_log.txt | 4 +++- share/drawframe.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 5eeb0b84a4..4e995de94a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -20,10 +20,12 @@ email address. comments in member functions and classes. Run Doxygen on the project, then look at the documentation for class INSPECTOR as an example. + pcbnew - zones.cpp, Trace_Pcb(), & EDGE_ZONE class: + * zones.cpp, Trace_Pcb(), & EDGE_ZONE class: Reversed the usage of EDGE_ZONE::Pnext and Pback in the list management to be consistent with other classes and with BOARD_ITEM::IterateForward() and BOARD::~BOARD(). + * Fixed a display bug when high contrast mode is enabled and the track tool + is selected. 2007-Oct-31 UPDATE Jean-Pierre Charras diff --git a/share/drawframe.cpp b/share/drawframe.cpp index 68490d5d08..267b64d918 100644 --- a/share/drawframe.cpp +++ b/share/drawframe.cpp @@ -506,6 +506,8 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, * Met a jour seulement les variables message et curseur */ { + bool redraw = false; + // Change Cursor if( DrawPanel ) { @@ -524,7 +526,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, || (m_ID_current_state!=ID_TRACK_BUTT && id==ID_TRACK_BUTT) ) { if( DisplayOpt.ContrastModeDisplay ) - ReDrawPanel(); + redraw = true; } #endif @@ -564,6 +566,11 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_ID_current_state = id; + + // must do this after the tool has been set, otherwise pad::Draw() does + // not show proper color when DisplayOpt.ContrastModeDisplay is true. + if( redraw ) + ReDrawPanel(); }