mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-28 09:35:37 +05:00
Qt4 porting: automatic resizing of Hypothesis Construction: Number of Segments dialog.
This commit is contained in:
parent
4352a0e199
commit
25db37c904
@ -152,7 +152,6 @@ bool SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_
|
||||
Dlg->setObjectName( theHypName );
|
||||
Dlg->setHIcon( icon() );
|
||||
Dlg->setType( type() );
|
||||
Dlg->setMinimumSize( Dlg->minimumSizeHint().width(), Dlg->minimumSizeHint().height() );
|
||||
retrieveParams();
|
||||
Dlg->show();
|
||||
if ( !myEventLoop )
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <QGridLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QApplication>
|
||||
|
||||
#define SPACING 6
|
||||
#define MARGIN 11
|
||||
@ -211,6 +212,9 @@ void StdMeshersGUI_NbSegmentsCreator::retrieveParams() const
|
||||
myTable->setFuncMinValue(myConv->checkedId()==0 ? -1E20 : 0);
|
||||
myTable->setData( data.myTable );
|
||||
myExpr->setText( data.myExpr );
|
||||
|
||||
if ( dlg() )
|
||||
dlg()->setMinimumSize( dlg()->minimumSizeHint().width(), dlg()->minimumSizeHint().height() );
|
||||
}
|
||||
|
||||
QString StdMeshersGUI_NbSegmentsCreator::storeParams() const
|
||||
@ -394,4 +398,11 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged()
|
||||
|
||||
if( isFunc )
|
||||
myPreview->setConversion( StdMeshersGUI_DistrPreview::Conversion( myConv->checkedId() ) );
|
||||
|
||||
if ( dlg() ) {
|
||||
QApplication::instance()->processEvents();
|
||||
dlg()->updateGeometry();
|
||||
dlg()->setMinimumSize( dlg()->minimumSizeHint().width(), dlg()->minimumSizeHint().height() );
|
||||
dlg()->resize( dlg()->minimumSize() );
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,9 @@ void StdMeshersGUI_StdHypothesisCreator::retrieveParams() const
|
||||
if ( widgetToActivate )
|
||||
widgetToActivate->activateSelection();
|
||||
}
|
||||
|
||||
if ( dlg() )
|
||||
dlg()->setMinimumSize( dlg()->minimumSizeHint().width(), dlg()->minimumSizeHint().height() );
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user