IsShown() now returns false for non-selected wxNotebook pages, see #4343

This commit is contained in:
Paul Cornett
2015-08-15 11:09:03 -07:00
parent 05862e608d
commit 51e766093e
2 changed files with 7 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ public:
virtual void Lower(); virtual void Lower();
virtual bool Show( bool show = true ); virtual bool Show( bool show = true );
virtual bool IsShown() const;
virtual bool IsRetained() const; virtual bool IsRetained() const;

View File

@@ -3275,6 +3275,12 @@ bool wxWindowGTK::Show( bool show )
return true; return true;
} }
bool wxWindowGTK::IsShown() const
{
// return false for non-selected wxNotebook pages
return m_isShown && (m_widget == NULL || gtk_widget_get_child_visible(m_widget));
}
void wxWindowGTK::DoEnable( bool enable ) void wxWindowGTK::DoEnable( bool enable )
{ {
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") ); wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );