Fixed property editor re-positioning when additional column editor (e.g. label editor) is used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1727,8 +1727,10 @@ wxWindow* wxPropertyGrid::GetEditorControl() const
|
||||
void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
||||
{
|
||||
int secWid = 0;
|
||||
int newSplitterx = m_pState->DoGetSplitterPosition(m_selColumn-1);
|
||||
int newWidth = newSplitterx + m_pState->m_colWidths[m_selColumn];
|
||||
|
||||
// Use fixed selColumn 1 for main editor widgets
|
||||
int newSplitterx = m_pState->DoGetSplitterPosition(0);
|
||||
int newWidth = newSplitterx + m_pState->m_colWidths[1];
|
||||
|
||||
if ( m_wndEditor2 )
|
||||
{
|
||||
@@ -1768,25 +1770,41 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
||||
|
||||
void wxPropertyGrid::CorrectEditorWidgetPosY()
|
||||
{
|
||||
if ( GetSelection() && (m_wndEditor || m_wndEditor2) )
|
||||
{
|
||||
wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn);
|
||||
wxPGProperty* selected = GetSelection();
|
||||
|
||||
if ( m_wndEditor )
|
||||
if ( selected )
|
||||
{
|
||||
if ( m_labelEditor )
|
||||
{
|
||||
wxPoint pos = m_wndEditor->GetPosition();
|
||||
wxRect r = GetEditorWidgetRect(selected, m_selColumn);
|
||||
wxPoint pos = m_labelEditor->GetPosition();
|
||||
|
||||
// Calculate y offset
|
||||
int offset = pos.y % m_lineHeight;
|
||||
|
||||
m_wndEditor->Move(pos.x, r.y + offset);
|
||||
m_labelEditor->Move(pos.x, r.y + offset);
|
||||
}
|
||||
|
||||
if ( m_wndEditor2 )
|
||||
if ( m_wndEditor || m_wndEditor2 )
|
||||
{
|
||||
wxPoint pos = m_wndEditor2->GetPosition();
|
||||
wxRect r = GetEditorWidgetRect(selected, 1);
|
||||
|
||||
m_wndEditor2->Move(pos.x, r.y);
|
||||
if ( m_wndEditor )
|
||||
{
|
||||
wxPoint pos = m_wndEditor->GetPosition();
|
||||
|
||||
// Calculate y offset
|
||||
int offset = pos.y % m_lineHeight;
|
||||
|
||||
m_wndEditor->Move(pos.x, r.y + offset);
|
||||
}
|
||||
|
||||
if ( m_wndEditor2 )
|
||||
{
|
||||
wxPoint pos = m_wndEditor2->GetPosition();
|
||||
|
||||
m_wndEditor2->Move(pos.x, r.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user