More robust checks for OpenGL canvas visibility.
This commit is contained in:
parent
a30c8d7848
commit
3ca7026aa0
|
@ -479,7 +479,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent )
|
|||
|
||||
void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
|
||||
{
|
||||
if( IsShownOnScreen() )
|
||||
if( m_gal && m_gal->IsVisible() )
|
||||
{
|
||||
m_onShowTimer.Stop();
|
||||
OnShow();
|
||||
|
|
|
@ -85,6 +85,11 @@ public:
|
|||
|
||||
virtual ~CAIRO_GAL();
|
||||
|
||||
///> @copydoc GAL::IsVisible()
|
||||
bool IsVisible() const override {
|
||||
return IsShownOnScreen();
|
||||
}
|
||||
|
||||
// ---------------
|
||||
// Drawing methods
|
||||
// ---------------
|
||||
|
|
|
@ -69,6 +69,9 @@ public:
|
|||
/// @brief Returns the initalization status for the canvas.
|
||||
virtual bool IsInitialized() const { return true; }
|
||||
|
||||
/// @brief Returns true if the GAL canvas is visible on the screen.
|
||||
virtual bool IsVisible() const { return true; }
|
||||
|
||||
// ---------------
|
||||
// Drawing methods
|
||||
// ---------------
|
||||
|
|
|
@ -86,6 +86,11 @@ public:
|
|||
/// @copydoc GAL::IsInitialized()
|
||||
virtual bool IsInitialized() const { return IsShownOnScreen(); }
|
||||
|
||||
///> @copydoc GAL::IsVisible()
|
||||
bool IsVisible() const override {
|
||||
return IsShownOnScreen();
|
||||
}
|
||||
|
||||
// ---------------
|
||||
// Drawing methods
|
||||
// ---------------
|
||||
|
|
Loading…
Reference in New Issue