From 95645cce6ebab1c4f0a705691f57e4a123cf6e91 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 5 Oct 2008 09:47:16 +0000 Subject: [PATCH] Have GetDescBoxHeight() return value consistent with one given to SetDescBoxHeight(); In SetDescBoxHeight(), do not call RecalculatePositions() unless box height really changed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/manager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index d6b17107cb..68fed4406c 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1135,9 +1135,12 @@ void wxPropertyGridManager::SetDescBoxHeight( int ht, bool refresh ) { if ( m_windowStyle & wxPG_DESCRIPTION ) { - m_nextDescBoxSize = ht; - if ( refresh ) - RecalculatePositions(m_width, m_height); + if ( ht != GetDescBoxHeight() ) + { + m_nextDescBoxSize = ht; + if ( refresh ) + RecalculatePositions(m_width, m_height); + } } } @@ -1145,7 +1148,7 @@ void wxPropertyGridManager::SetDescBoxHeight( int ht, bool refresh ) int wxPropertyGridManager::GetDescBoxHeight() const { - return GetClientSize().y - m_splitterY; + return GetClientSize().y - m_splitterY - m_splitterHeight; } // ----------------------------------------------------------------------- -- 2.45.2