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
This commit is contained in:
Jaakko Salli
2008-10-05 09:47:16 +00:00
parent c3e57ac4ac
commit 95645cce6e

View File

@@ -1134,18 +1134,21 @@ void wxPropertyGridManager::RecalculatePositions( int width, int height )
void wxPropertyGridManager::SetDescBoxHeight( int ht, bool refresh )
{
if ( m_windowStyle & wxPG_DESCRIPTION )
{
if ( ht != GetDescBoxHeight() )
{
m_nextDescBoxSize = ht;
if ( refresh )
RecalculatePositions(m_width, m_height);
}
}
}
// -----------------------------------------------------------------------
int wxPropertyGridManager::GetDescBoxHeight() const
{
return GetClientSize().y - m_splitterY;
return GetClientSize().y - m_splitterY - m_splitterHeight;
}
// -----------------------------------------------------------------------