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()
|
void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
||||||
{
|
{
|
||||||
int secWid = 0;
|
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 )
|
if ( m_wndEditor2 )
|
||||||
{
|
{
|
||||||
@@ -1768,9 +1770,24 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX()
|
|||||||
|
|
||||||
void wxPropertyGrid::CorrectEditorWidgetPosY()
|
void wxPropertyGrid::CorrectEditorWidgetPosY()
|
||||||
{
|
{
|
||||||
if ( GetSelection() && (m_wndEditor || m_wndEditor2) )
|
wxPGProperty* selected = GetSelection();
|
||||||
|
|
||||||
|
if ( selected )
|
||||||
{
|
{
|
||||||
wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn);
|
if ( m_labelEditor )
|
||||||
|
{
|
||||||
|
wxRect r = GetEditorWidgetRect(selected, m_selColumn);
|
||||||
|
wxPoint pos = m_labelEditor->GetPosition();
|
||||||
|
|
||||||
|
// Calculate y offset
|
||||||
|
int offset = pos.y % m_lineHeight;
|
||||||
|
|
||||||
|
m_labelEditor->Move(pos.x, r.y + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_wndEditor || m_wndEditor2 )
|
||||||
|
{
|
||||||
|
wxRect r = GetEditorWidgetRect(selected, 1);
|
||||||
|
|
||||||
if ( m_wndEditor )
|
if ( m_wndEditor )
|
||||||
{
|
{
|
||||||
@@ -1789,6 +1806,7 @@ void wxPropertyGrid::CorrectEditorWidgetPosY()
|
|||||||
m_wndEditor2->Move(pos.x, r.y);
|
m_wndEditor2->Move(pos.x, r.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user