// SMESH includes
//
#include "StdMeshersGUI_NbSegmentsCreator.h"
-#include "StdMeshersGUI_DistrPreview.h"
+#ifndef DISABLE_PLOT2DVIEWER
+ #include "StdMeshersGUI_DistrPreview.h"
+#endif
#include "StdMeshersGUI_DistrTable.h"
#include "StdMeshersGUI_PropagationHelperWdg.h"
#include "StdMeshersGUI_SubShapeSelectorWdg.h"
myDistr( 0 ),
myScale( 0 ),
myTable( 0 ),
+#ifndef DISABLE_PLOT2DVIEWER
myPreview( 0 ),
+#endif
myExpr( 0 ),
myConvBox( 0 ),
myConv( 0 ),
readParamsFromHypo( data_old );
readParamsFromWidgets( data_new );
bool res = storeParamsToHypo( data_new );
- storeParamsToHypo( data_old );
res = myNbSeg->isValid( msg, true ) && res;
res = myScale->isValid( msg, true ) && res;
+ if ( !res )
+ storeParamsToHypo( data_old );
return res;
}
// c) table
myTable = new StdMeshersGUI_DistrTableFrame( GroupC1 );
+ myTable->setMinimumHeight(220);
myDistLayout->addWidget( myTable, 1, 0, 2, 1 );
+#ifndef DISABLE_PLOT2DVIEWER
// d) preview
myPreview = new StdMeshersGUI_DistrPreview( GroupC1, h.in() );
- myPreview->setMinimumHeight(220);
myDistLayout->addWidget( myPreview, 1, 1, 2, 1 );
+#endif
// 5) conversion (radiogroup)
myConvBox = new QGroupBox( tr( "SMESH_CONV_MODE" ), GroupC1 );
h->SetVarParameter( h_data.myNbSegVarName.toLatin1().constData(), "SetNumberOfSegments" );
h->SetNumberOfSegments( h_data.myNbSeg );
- int distr = h_data.myDistrType;
- h->SetDistrType( distr );
+ int distr = h_data.myDistrType;
+ if ( distr == 0 )
+ h->SetDistrType( distr ); // this is actually needed at non-uniform -> uniform switch
if( distr==1 ) {
h->SetVarParameter( h_data.myScaleVarName.toLatin1().constData(), "SetScaleFactor" );
h->SetScaleFactor( h_data.myScale );
myDirectionWidget->ShowPreview( distr!=0 );
bool isFunc = distr==2 || distr==3;
+#ifndef DISABLE_PLOT2DVIEWER
myPreview->setShown( isFunc );
+#endif
myConvBox->setShown( isFunc );
myTable->setShown( distr==2 );
myLExpr->setShown( distr==3 );
myInfo->setShown( distr==3);
+#ifndef DISABLE_PLOT2DVIEWER
//change of preview
int nbSeg = myNbSeg->value();
if( distr==2 ) //preview for table-described function
if( isFunc )
myPreview->setConversion( StdMeshersGUI_DistrPreview::Conversion( myConv->checkedId() ) );
+#endif
if ( (QtxComboBox*)sender() == myDistr && dlg() ) {
QApplication::instance()->processEvents();