From 5c0acce6947c7cda521d898aa2ea21e4d2ea00d5 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 26 Dec 2018 11:03:39 +0100 Subject: [PATCH] Hide editor button while column splitter is being dragged Main editor and its button (secondary editor) should be both hidden while dragging the splitter because it's misleading when one part of the property editor disappears and another part remains visible. --- src/propgrid/propgrid.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 8565941760..bacf402ba1 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -4910,11 +4910,10 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even m_draggedSplitter = splitterHit; m_dragOffset = splitterHitOffset; - #if wxPG_REFRESH_CONTROLS - // Fixes button disappearance bug if ( m_wndEditor2 ) - m_wndEditor2->Show ( false ); - #endif + { + m_wndEditor2->Hide(); + } m_startingSplitterX = x - splitterHitOffset; } @@ -5273,11 +5272,10 @@ bool wxPropertyGrid::HandleMouseUp( int x, unsigned int WXUNUSED(y), m_wndEditor->Show ( true ); } - #if wxPG_REFRESH_CONTROLS - // Fixes button disappearance bug if ( m_wndEditor2 ) - m_wndEditor2->Show ( true ); - #endif + { + m_wndEditor2->Show(true); + } // This clears the focus. m_editorFocused = false;