Fixed a layout problem when resizing
This commit is contained in:
parent
e1bd4b433c
commit
8d041e9433
|
@ -63,7 +63,7 @@ InsertPanel::InsertPanel (
|
||||||
wxLB_SORT | wxLB_HSCROLL );
|
wxLB_SORT | wxLB_HSCROLL );
|
||||||
|
|
||||||
sizer->Add ( edit, 0, wxGROW | wxTOP, 0 );
|
sizer->Add ( edit, 0, wxGROW | wxTOP, 0 );
|
||||||
sizer->Add ( list, 0, wxGROW | wxTOP, 0 );
|
sizer->Add ( list, 1, wxGROW | wxTOP, 0 );
|
||||||
sizer->Layout();
|
sizer->Layout();
|
||||||
list->Show ( false );
|
list->Show ( false );
|
||||||
}
|
}
|
||||||
|
@ -105,15 +105,11 @@ void InsertPanel::update (
|
||||||
for ( it = entitySet.begin(); it != entitySet.end(); it++ )
|
for ( it = entitySet.begin(); it != entitySet.end(); it++ )
|
||||||
list->Append ( *it );
|
list->Append ( *it );
|
||||||
list->Show ( true );
|
list->Show ( true );
|
||||||
|
#if wxCHECK_VERSION(2,9,0)
|
||||||
wxSize clientSize = GetClientSize();
|
|
||||||
wxSize editSize = edit->GetSize();
|
|
||||||
wxSize listSize =
|
|
||||||
wxSize ( clientSize.GetWidth(), clientSize.GetHeight() - editSize.GetHeight() );
|
|
||||||
list->SetSize ( listSize );
|
|
||||||
list->Update();
|
list->Update();
|
||||||
|
#else
|
||||||
//sizer->Layout();
|
sizer->Layout();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,15 +142,11 @@ void InsertPanel::update (
|
||||||
for ( it = elementSet.begin(); it != elementSet.end(); it++ )
|
for ( it = elementSet.begin(); it != elementSet.end(); it++ )
|
||||||
list->Append ( *it );
|
list->Append ( *it );
|
||||||
list->Show ( true );
|
list->Show ( true );
|
||||||
|
#if wxCHECK_VERSION(2,9,0)
|
||||||
wxSize clientSize = GetClientSize();
|
|
||||||
wxSize editSize = edit->GetSize();
|
|
||||||
wxSize listSize =
|
|
||||||
wxSize ( clientSize.GetWidth(), clientSize.GetHeight() - editSize.GetHeight() );
|
|
||||||
|
|
||||||
if ( clientSize.IsFullySpecified() && editSize.IsFullySpecified() )
|
|
||||||
list->SetSize ( listSize );
|
|
||||||
list->Update();
|
list->Update();
|
||||||
|
#else
|
||||||
|
sizer->Layout();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InsertPanel::OnEnter ( wxCommandEvent& event )
|
void InsertPanel::OnEnter ( wxCommandEvent& event )
|
||||||
|
|
|
@ -61,7 +61,7 @@ LocationPanel::LocationPanel ( wxWindow *parentWindowParameter, int id ) :
|
||||||
structureEdit->SetIndentationGuides ( true );
|
structureEdit->SetIndentationGuides ( true );
|
||||||
|
|
||||||
sizer->Add ( edit, 0, wxGROW | wxTOP, 0 );
|
sizer->Add ( edit, 0, wxGROW | wxTOP, 0 );
|
||||||
sizer->Add ( structureEdit, 0, wxGROW | wxTOP, 0 );
|
sizer->Add ( structureEdit, 1, wxGROW | wxTOP, 0 );
|
||||||
sizer->Layout();
|
sizer->Layout();
|
||||||
structureEdit->Show ( false );
|
structureEdit->Show ( false );
|
||||||
}
|
}
|
||||||
|
@ -91,15 +91,11 @@ void LocationPanel::update (
|
||||||
structureEdit->SetReadOnly ( false );
|
structureEdit->SetReadOnly ( false );
|
||||||
structureEdit->SetText ( structure );
|
structureEdit->SetText ( structure );
|
||||||
structureEdit->SetReadOnly ( true );
|
structureEdit->SetReadOnly ( true );
|
||||||
|
#if wxCHECK_VERSION(2,9,0)
|
||||||
wxSize clientSize = GetClientSize();
|
|
||||||
wxSize editSize = edit->GetSize();
|
|
||||||
wxSize structureSize =
|
|
||||||
wxSize ( clientSize.GetWidth(), clientSize.GetHeight() - editSize.GetHeight() );
|
|
||||||
|
|
||||||
if ( clientSize.IsFullySpecified() && editSize.IsFullySpecified() )
|
|
||||||
structureEdit->SetSize ( structureSize );
|
|
||||||
structureEdit->Update();
|
structureEdit->Update();
|
||||||
|
#else
|
||||||
|
sizer->Layout();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue