Fixed preview pane resizing
This commit is contained in:
parent
54905cb15c
commit
97d4c33a9f
|
@ -84,7 +84,6 @@ enum {
|
|||
};
|
||||
|
||||
wxBEGIN_EVENT_TABLE( PANEL_PREV_3D, wxPanel)
|
||||
EVT_SIZE( PANEL_PREV_3D::resize )
|
||||
EVT_CHOICE( ID_SET_DIR, PANEL_PREV_3D::SetRootDir )
|
||||
EVT_TEXT_ENTER( ID_SCALEX, PANEL_PREV_3D::updateOrientation )
|
||||
EVT_TEXT_ENTER( ID_SCALEY, PANEL_PREV_3D::updateOrientation )
|
||||
|
@ -616,7 +615,9 @@ void PANEL_PREV_3D::UpdateModelName( wxString const& aModelName )
|
|||
std::cout << "[3dv] Update Model: canvas creation FAILED\n";
|
||||
#endif
|
||||
|
||||
canvas->SetSize( preview->GetClientSize() );
|
||||
wxSizer* ws = new wxBoxSizer( wxHORIZONTAL );
|
||||
ws->Add( canvas, 10, wxEXPAND );
|
||||
preview->SetSizerAndFit( ws );
|
||||
}
|
||||
|
||||
canvas->Set3DModel( *model );
|
||||
|
@ -649,17 +650,6 @@ void PANEL_PREV_3D::UpdateWindowUI( long flags )
|
|||
}
|
||||
|
||||
|
||||
void PANEL_PREV_3D::resize( wxSizeEvent &event )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if( NULL != canvas )
|
||||
canvas->SetSize( preview->GetClientSize() );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event )
|
||||
{
|
||||
// note: process even if the canvas is NULL since the user may
|
||||
|
|
|
@ -88,9 +88,9 @@ private:
|
|||
S3DMODEL* model;
|
||||
S3D_INFO modelInfo;
|
||||
|
||||
|
||||
private:
|
||||
void updateDirChoiceList( void );
|
||||
void resize( wxSizeEvent &event );
|
||||
void updateOrientation( wxCommandEvent &event );
|
||||
|
||||
void getOrientationVars( SGPOINT& scale, SGPOINT& rotation, SGPOINT& offset );
|
||||
|
|
Loading…
Reference in New Issue