From: Jaakko Salli Date: Sun, 5 Oct 2008 09:47:16 +0000 (+0000) Subject: Have GetDescBoxHeight() return value consistent with one given to SetDescBoxHeight... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/95645cce6ebab1c4f0a705691f57e4a123cf6e91 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 --- 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; } // -----------------------------------------------------------------------