Fixed bug with notebook pages not showing (probably affected any
wxWindow/wxPanel child when panel was hidden and then shown again). The bug was introduced by the fix for hidden windows still intercepting mouse events. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -172,19 +172,6 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
|||||||
if ( !w )
|
if ( !w )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// if the widget is not unmanaged, it still intercepts
|
|
||||||
// mouse events, even if it is not mapped (and hence invisible)
|
|
||||||
if ( domap )
|
|
||||||
{
|
|
||||||
XtManageChild(w);
|
|
||||||
XtMapWidget(w);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
XtUnmapWidget(w);
|
|
||||||
XtUnmanageChild(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rationale: a lot of common operations (including but not
|
// Rationale: a lot of common operations (including but not
|
||||||
// limited to moving, resizing and appending items to a listbox)
|
// limited to moving, resizing and appending items to a listbox)
|
||||||
// unmamange the widget, do their work, then manage it again.
|
// unmamange the widget, do their work, then manage it again.
|
||||||
@@ -192,6 +179,19 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
|||||||
// or that most controls are shown every time they are moved or resized!
|
// or that most controls are shown every time they are moved or resized!
|
||||||
XtSetMappedWhenManaged( w, domap );
|
XtSetMappedWhenManaged( w, domap );
|
||||||
|
|
||||||
|
// if the widget is not unmanaged, it still intercepts
|
||||||
|
// mouse events, even if it is not mapped (and hence invisible)
|
||||||
|
if ( domap )
|
||||||
|
{
|
||||||
|
XtManageChild(w);
|
||||||
|
// XtMapWidget(w);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XtUnmanageChild(w);
|
||||||
|
// XtUnmapWidget(w);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -634,8 +634,8 @@ bool wxWindow::Show(bool show)
|
|||||||
|
|
||||||
if (m_borderWidget || m_scrolledWindow)
|
if (m_borderWidget || m_scrolledWindow)
|
||||||
{
|
{
|
||||||
MapOrUnmap(m_drawingArea, show);
|
|
||||||
MapOrUnmap(m_borderWidget ? m_borderWidget : m_scrolledWindow, show);
|
MapOrUnmap(m_borderWidget ? m_borderWidget : m_scrolledWindow, show);
|
||||||
|
// MapOrUnmap(m_drawingArea, show);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user