Commit ad2df709 authored by Maciej Suminski's avatar Maciej Suminski

Added EDA_DRAW_PANEL_GAL::ForceRefresh().

parent 1c74019f
...@@ -168,8 +168,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect ) ...@@ -168,8 +168,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
if( delta >= MinRefreshPeriod ) if( delta >= MinRefreshPeriod )
{ {
wxPaintEvent redrawEvent; ForceRefresh();
wxPostEvent( this, redrawEvent );
m_pendingRefresh = true; m_pendingRefresh = true;
} }
else else
...@@ -181,6 +180,13 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect ) ...@@ -181,6 +180,13 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
} }
void EDA_DRAW_PANEL_GAL::ForceRefresh()
{
wxPaintEvent redrawEvent;
wxPostEvent( this, redrawEvent );
}
void EDA_DRAW_PANEL_GAL::SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) void EDA_DRAW_PANEL_GAL::SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher )
{ {
m_eventDispatcher = aEventDispatcher; m_eventDispatcher = aEventDispatcher;
......
...@@ -110,6 +110,12 @@ public: ...@@ -110,6 +110,12 @@ public:
/// @copydoc wxWindow::Refresh() /// @copydoc wxWindow::Refresh()
void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL ); void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL );
/**
* Function ForceRefresh()
* Forces a redraw.
*/
void ForceRefresh();
/** /**
* Function SetEventDispatcher() * Function SetEventDispatcher()
* Sets a dispatcher that processes events and forwards them to tools. * Sets a dispatcher that processes events and forwards them to tools.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment