Loading common/zoom.cpp +9 −7 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "class_drawpanel.h" #include "class_drawpanel.h" #include "class_base_screen.h" #include "class_base_screen.h" #include "wxstruct.h" #include "wxstruct.h" #include "kicad_device_context.h" /** Compute draw offset (scroll bars and draw parameters) /** Compute draw offset (scroll bars and draw parameters) * in order to have the current graphic cursor position at the screen center * in order to have the current graphic cursor position at the screen center Loading @@ -27,14 +28,15 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) PutOnGrid( &(GetBaseScreen()->m_Curseur) ); PutOnGrid( &(GetBaseScreen()->m_Curseur) ); AdjustScrollBars(); AdjustScrollBars(); DrawPanel->m_IgnoreMouseEvents = true; DrawPanel->Refresh(); // send OnPaint event // wxSafeYield() is better here, but creates flicker under Linux /* We do not use here DrawPanel->Refresh() because // because it temporary disables menus and toolbars * the redraw is delayed and the mouse events (from MouseToCursorSchema ot others) // TODO: find a better way to manage refresh screen and mouse move * during this delay create problems: the mouse cursor position is false in calculations. wxYield(); // needed to allow OnPaint event execution here * TODO: see exactly how the mouse creates problems when moving during refresh DrawPanel->m_IgnoreMouseEvents = false; * use Refresh() and update() do not change problems */ INSTALL_DC(dc,DrawPanel); DrawPanel->ReDraw( &dc ); /* Move the mouse cursor to the on grid graphic cursor position */ /* Move the mouse cursor to the on grid graphic cursor position */ if( ToMouse == TRUE ) if( ToMouse == TRUE ) Loading Loading
common/zoom.cpp +9 −7 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "class_drawpanel.h" #include "class_drawpanel.h" #include "class_base_screen.h" #include "class_base_screen.h" #include "wxstruct.h" #include "wxstruct.h" #include "kicad_device_context.h" /** Compute draw offset (scroll bars and draw parameters) /** Compute draw offset (scroll bars and draw parameters) * in order to have the current graphic cursor position at the screen center * in order to have the current graphic cursor position at the screen center Loading @@ -27,14 +28,15 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) PutOnGrid( &(GetBaseScreen()->m_Curseur) ); PutOnGrid( &(GetBaseScreen()->m_Curseur) ); AdjustScrollBars(); AdjustScrollBars(); DrawPanel->m_IgnoreMouseEvents = true; DrawPanel->Refresh(); // send OnPaint event // wxSafeYield() is better here, but creates flicker under Linux /* We do not use here DrawPanel->Refresh() because // because it temporary disables menus and toolbars * the redraw is delayed and the mouse events (from MouseToCursorSchema ot others) // TODO: find a better way to manage refresh screen and mouse move * during this delay create problems: the mouse cursor position is false in calculations. wxYield(); // needed to allow OnPaint event execution here * TODO: see exactly how the mouse creates problems when moving during refresh DrawPanel->m_IgnoreMouseEvents = false; * use Refresh() and update() do not change problems */ INSTALL_DC(dc,DrawPanel); DrawPanel->ReDraw( &dc ); /* Move the mouse cursor to the on grid graphic cursor position */ /* Move the mouse cursor to the on grid graphic cursor position */ if( ToMouse == TRUE ) if( ToMouse == TRUE ) Loading