MacOSX: Complete support for wxOverlay (http://trac.wxwidgets.org/ticket/12894)
This commit is contained in:
parent
34e4ec5cf1
commit
9214f5849e
|
@ -22,20 +22,8 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
|
|||
{
|
||||
AdjustScrollBars( aCenterPoint );
|
||||
|
||||
#if !defined(__WXMAC__)
|
||||
/* DrawPanel->Refresh() is not used here because the redraw is delayed and the mouse
|
||||
* events (from MoveCursorToCrossHair ot others) during this delay create problems: the
|
||||
* mouse cursor position is false in calculations. TODO: see exactly how the mouse
|
||||
* creates problems when moving during refresh use Refresh() and update() do not change
|
||||
* problems
|
||||
*/
|
||||
INSTALL_DC( dc, DrawPanel );
|
||||
DrawPanel->SetClipBox( dc );
|
||||
DrawPanel->ReDraw( &dc, true );
|
||||
#else
|
||||
DrawPanel->Refresh();
|
||||
DrawPanel->Update();
|
||||
#endif
|
||||
|
||||
/* Move the mouse cursor to the on grid graphic cursor position */
|
||||
if( aWarpPointer )
|
||||
|
|
|
@ -221,8 +221,18 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
|
||||
if( DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
#ifdef USE_WX_OVERLAY
|
||||
wxDCOverlay oDC( DrawPanel->m_overlay, (wxWindowDC*)aDC );
|
||||
oDC.Clear();
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, false );
|
||||
#else
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true );
|
||||
#endif
|
||||
}
|
||||
#ifdef USE_WX_OVERLAY
|
||||
else
|
||||
DrawPanel->m_overlay.Reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
if( aHotKey )
|
||||
|
@ -294,8 +304,18 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
|
||||
if( DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
#ifdef USE_WX_OVERLAY
|
||||
wxDCOverlay oDC( DrawPanel->m_overlay, (wxWindowDC*)aDC );
|
||||
oDC.Clear();
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, false );
|
||||
#else
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true );
|
||||
#endif
|
||||
}
|
||||
#ifdef USE_WX_OVERLAY
|
||||
else
|
||||
DrawPanel->m_overlay.Reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
if( aHotKey )
|
||||
|
|
|
@ -688,6 +688,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
|||
if( showTrackClearanceMode != DO_NOT_SHOW_CLEARANCE )
|
||||
DisplayOpt.ShowTrackClearanceMode = SHOW_CLEARANCE_ALWAYS;
|
||||
|
||||
#ifndef USE_WX_OVERLAY
|
||||
/* Erase old track */
|
||||
if( aErase )
|
||||
{
|
||||
|
@ -705,7 +706,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
|||
color );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// MacOSX seems to need this.
|
||||
if( g_CurrentTrackList.GetCount() == 0 )
|
||||
return;
|
||||
|
|
|
@ -387,8 +387,18 @@ void WinEDA_ModuleEditFrame::GeneralControl( wxDC* aDC, const wxPoint& aPosition
|
|||
|
||||
if( DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
#ifdef USE_WX_OVERLAY
|
||||
wxDCOverlay oDC( DrawPanel->m_overlay, (wxWindowDC*)aDC );
|
||||
oDC.Clear();
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, false );
|
||||
#else
|
||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, aPosition, true );
|
||||
#endif
|
||||
}
|
||||
#ifdef USE_WX_OVERLAY
|
||||
else
|
||||
DrawPanel->m_overlay.Reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
if( aHotKey )
|
||||
|
|
Loading…
Reference in New Issue