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 )
|
void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( IsShownOnScreen() )
|
if( m_gal && m_gal->IsVisible() )
|
||||||
{
|
{
|
||||||
m_onShowTimer.Stop();
|
m_onShowTimer.Stop();
|
||||||
OnShow();
|
OnShow();
|
||||||
|
|
|
@ -85,6 +85,11 @@ public:
|
||||||
|
|
||||||
virtual ~CAIRO_GAL();
|
virtual ~CAIRO_GAL();
|
||||||
|
|
||||||
|
///> @copydoc GAL::IsVisible()
|
||||||
|
bool IsVisible() const override {
|
||||||
|
return IsShownOnScreen();
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------
|
// ---------------
|
||||||
// Drawing methods
|
// Drawing methods
|
||||||
// ---------------
|
// ---------------
|
||||||
|
|
|
@ -66,9 +66,12 @@ public:
|
||||||
GAL();
|
GAL();
|
||||||
virtual ~GAL();
|
virtual ~GAL();
|
||||||
|
|
||||||
/// @brief Returns the initalization status for the canvas.
|
/// @brief Returns the initalization status for the canvas.
|
||||||
virtual bool IsInitialized() const { return true; }
|
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
|
// Drawing methods
|
||||||
// ---------------
|
// ---------------
|
||||||
|
|
|
@ -83,9 +83,14 @@ public:
|
||||||
|
|
||||||
virtual ~OPENGL_GAL();
|
virtual ~OPENGL_GAL();
|
||||||
|
|
||||||
/// @copydoc GAL::IsInitialized()
|
/// @copydoc GAL::IsInitialized()
|
||||||
virtual bool IsInitialized() const { return IsShownOnScreen(); }
|
virtual bool IsInitialized() const { return IsShownOnScreen(); }
|
||||||
|
|
||||||
|
///> @copydoc GAL::IsVisible()
|
||||||
|
bool IsVisible() const override {
|
||||||
|
return IsShownOnScreen();
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------
|
// ---------------
|
||||||
// Drawing methods
|
// Drawing methods
|
||||||
// ---------------
|
// ---------------
|
||||||
|
|
Loading…
Reference in New Issue