From: rnv Date: Wed, 23 Mar 2011 10:18:35 +0000 (+0000) Subject: Implementation of the "21187: EDF 1137 GEOM: Performance issue when manipulating... X-Git-Tag: Start_BR_19998_21191~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=46574ac4f48a11f2161e754fe7c8df8684bc2b78;p=modules%2Fgeom.git Implementation of the "21187: EDF 1137 GEOM: Performance issue when manipulating large models" issue. --- diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index e57d0cf32..3cfbdd1c9 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -52,6 +52,7 @@ + diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index e514c2a12..122f7aebe 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -217,6 +217,8 @@ void AdvancedGUI_PipeTShapeDlg::Init() { CssAcceptable = "QDoubleSpinBox, QPushButton {background-color: rgb(85, 170, 127)}"; CssRefused = "QDoubleSpinBox, QPushButton {background-color: rgb(255, 0, 0)}"; + showOnlyPreviewControl(); + // Signal/slot connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -249,7 +251,7 @@ void AdvancedGUI_PipeTShapeDlg::Init() { initName(tr("GEOM_PIPE_TSHAPE")); updateTshapeScreenshotLabel(); - DisplayPreview(); + processPreview(); } //================================================================================= @@ -271,7 +273,7 @@ void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions() { MainTubeGroupParams->SpinBox_DZ->setToolTip(""); MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);"); CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } } } @@ -285,7 +287,7 @@ void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions() { IncidentTubeGroupParams->SpinBox_DZ->setToolTip(""); IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);"); CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } } } @@ -369,7 +371,7 @@ void AdvancedGUI_PipeTShapeDlg::SetPosition(bool isChecked) { disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); JunctionPointsSel->LineEdit4->setText(""); JunctionPointsSel->LineEdit5->setText(""); - DisplayPreview(); + processPreview(); } } @@ -381,7 +383,7 @@ void AdvancedGUI_PipeTShapeDlg::ValueChangedInSpinBox(double newValue) { if (JunctionPointsSel->GroupBox1->isChecked() && myOkPoint1 && myOkPoint2 && myOkPoint3) CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } //================================================================================= @@ -467,7 +469,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() { if (myOkPoint1 && myOkPoint2 && myOkPoint3) { CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } // GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First()); @@ -596,7 +598,7 @@ void AdvancedGUI_PipeTShapeDlg::ActivateThisDialog() { // currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); if (myOkPoint1 && myOkPoint2 && myOkPoint3) CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } //================================================================================= @@ -649,7 +651,7 @@ void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet(bool) { updateTshapeScreenshotLabel(); if (myOkPoint1 && myOkPoint2 && myOkPoint3) CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } else if (send == FilletGroupParams->GroupBox1) { if (send->isChecked()) { disconnect(ChamferGroupParams->GroupBox1, SIGNAL(toggled(bool)), this, 0); @@ -662,7 +664,7 @@ void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet(bool) { updateTshapeScreenshotLabel(); if (myOkPoint1 && myOkPoint2 && myOkPoint3) CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01); - DisplayPreview(); + processPreview(); } } @@ -973,3 +975,14 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy, S } } + +//================================================================================= +// function : processPreview() +// purpose : Display preview if CheckBoxPreview is checked +//================================================================================= +void AdvancedGUI_PipeTShapeDlg::processPreview() { + if(mainFrame()->CheckBoxPreview->isChecked()) + DisplayPreview(); + else + erasePreview(true); +} diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h index e4fece9b9..8d64902cb 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h @@ -83,6 +83,7 @@ private slots: void DisplayPreview(const bool activate = false, const bool update = true, const bool toRemoveFromEngine = true, const double lineWidth = -1, const int displayMode = -1, const int color = -1); + virtual void processPreview(); void SetPosition(bool); void ChamferOrFillet(bool); void SetDoubleSpinBoxStep(double); diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index bf23ab463..48be784b5 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -319,7 +319,7 @@ void BasicGUI_ArcDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } @@ -416,7 +416,7 @@ void BasicGUI_ArcDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); // SelectionIntoArgument(); send->setDown(true); - displayPreview(); + displayPreview(true); } @@ -592,7 +592,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId ) SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -601,7 +601,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId ) //================================================================================= void BasicGUI_ArcDlg::ReverseSense() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index c71bdf821..9ca955c71 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -289,7 +289,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId ) connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -391,7 +391,7 @@ void BasicGUI_CircleDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } @@ -476,7 +476,7 @@ void BasicGUI_CircleDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); // SelectionIntoArgument(); send->setDown(true); - displayPreview(); + displayPreview(true); } @@ -520,7 +520,7 @@ void BasicGUI_CircleDlg::DeactivateActiveDialog() //================================================================================= void BasicGUI_CircleDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 61fd4292a..0b0fb67a8 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -122,6 +122,8 @@ void BasicGUI_CurveDlg::Init() globalSelection(); // close local contexts, if any localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + showOnlyPreviewControl(); + /* signals and slots connections */ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog( ) ) ); connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); @@ -141,7 +143,7 @@ void BasicGUI_CurveDlg::Init() initName( tr( "GEOM_CURVE" ) ); resize(100,100); - ConstructorsClicked( 0 ); + ConstructorsClicked( 0 ); } //================================================================================= @@ -197,7 +199,7 @@ void BasicGUI_CurveDlg::SetEditCurrentArgument() //================================================================================= void BasicGUI_CurveDlg::CheckButtonToggled() { - displayPreview(); + processPreview(); } //================================================================================= @@ -263,7 +265,7 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() GroupPoints->LineEdit1->setText( QString::number( myPoints.count() ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) ); else GroupPoints->LineEdit1->setText( "" ); - displayPreview(); + processPreview(); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 3f36eddac..464a02a73 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -159,7 +159,7 @@ void BasicGUI_EllipseDlg::Init() resize( minimumSizeHint() ); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -212,7 +212,7 @@ bool BasicGUI_EllipseDlg::ClickOnApply() globalSelection(); // close local contexts, if any localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); - displayPreview(); + displayPreview(true); return true; } @@ -261,7 +261,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } @@ -307,7 +307,7 @@ void BasicGUI_EllipseDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); //SelectionIntoArgument(); send->setDown(true); - displayPreview(); + displayPreview(true); } @@ -361,7 +361,7 @@ void BasicGUI_EllipseDlg::enterEvent( QEvent* ) //================================================================================= void BasicGUI_EllipseDlg::ValueChangedInSpinBox( double newValue ) { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index d9396d5d0..fd63aa81a 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -244,7 +244,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument() else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2.nullify(); else if (myEditCurrentArgument == GroupFaces->LineEdit1) myFace1.nullify(); else if (myEditCurrentArgument == GroupFaces->LineEdit2) myFace2.nullify(); - displayPreview(); + displayPreview(true); return; } @@ -278,7 +278,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -322,7 +322,7 @@ void BasicGUI_LineDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); // SelectionIntoArgument(); send->setDown(true); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index 0b8309e73..57115a86a 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -284,7 +284,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId ) } } - displayPreview(); + displayPreview(true); qApp->processEvents(); updateGeometry(); @@ -351,7 +351,7 @@ void BasicGUI_MarkerDlg::onSelectionDone0() myData[ DY2 ]->setValue( aYDir.Y() ); myData[ DZ2 ]->setValue( aYDir.Z() ); } - displayPreview(); + displayPreview(true); return; } aSelectedObject = getSelected( TopAbs_VERTEX ); @@ -360,7 +360,7 @@ void BasicGUI_MarkerDlg::onSelectionDone0() myData[ X ]->setValue( aPnt.X() ); myData[ Y ]->setValue( aPnt.Y() ); myData[ Z ]->setValue( aPnt.Z() ); - displayPreview(); + displayPreview(true); return; } } @@ -423,7 +423,7 @@ void BasicGUI_MarkerDlg::onSelectionDone() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -617,7 +617,7 @@ void BasicGUI_MarkerDlg::addSubshapesToStudy() //================================================================================= void BasicGUI_MarkerDlg::onValueChanged( double ) { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 7eb3506d7..3fb367fc6 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -377,7 +377,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - displayPreview(); + displayPreview(true); } @@ -420,7 +420,7 @@ void BasicGUI_PlaneDlg::GroupClicked() myOriginType = 2; else if ( send == GroupLCS->RadioButton3 ) myOriginType = 3; - displayPreview(); + displayPreview(true); } //================================================================================= @@ -445,7 +445,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument() else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) myVec1.nullify(); else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) myVec2.nullify(); else if ( myEditCurrentArgument == GroupLCS->LineEdit1 ) myLCS.nullify(); - displayPreview(); + displayPreview(true); return; } @@ -502,7 +502,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument() myLCS = aSelectedObject; } - displayPreview(); + displayPreview(true); } @@ -590,7 +590,7 @@ void BasicGUI_PlaneDlg::SetEditCurrentArgument() // SelectionIntoArgument(); myEditCurrentArgument->setFocus(); send->setDown(true); - displayPreview(); + displayPreview(true); } @@ -634,7 +634,7 @@ void BasicGUI_PlaneDlg::enterEvent( QEvent* ) //================================================================================= void BasicGUI_PlaneDlg::ValueChangedInSpinBox( double newValue ) { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 7810dcdda..8e0be7963 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -541,8 +541,8 @@ void BasicGUI_PointDlg::SelectionIntoArgument() } myBusy = false; } - - displayPreview(); + + displayPreview(true); } @@ -638,7 +638,7 @@ void BasicGUI_PointDlg::DeactivateActiveDialog() //================================================================================= void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue) { - displayPreview(); + displayPreview(true); } //================================================================================= @@ -647,7 +647,7 @@ void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue) //================================================================================= void BasicGUI_PointDlg::CheckBoxClicked( int State ) { - displayPreview(); + displayPreview(true); } @@ -692,7 +692,7 @@ void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt ) GroupXYZ->SpinBox_DY->setValue( thePnt.Y() ); GroupXYZ->SpinBox_DZ->setValue( thePnt.Z() ); - displayPreview(); + displayPreview(true); } } @@ -919,7 +919,7 @@ void BasicGUI_PointDlg::addSubshapesToStudy() void BasicGUI_PointDlg::ClickParamCoord( int id ) { updateParamCoord( true ); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index b05f3b093..b011ae1e1 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -230,7 +230,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId ) resize( minimumSizeHint() ); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } @@ -299,7 +299,7 @@ void BasicGUI_VectorDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -326,7 +326,7 @@ void BasicGUI_VectorDlg::SetEditCurrentArgument() globalSelection(); // close local selection to clear it localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); send->setDown(true); - displayPreview(); + displayPreview(true); } @@ -368,7 +368,7 @@ void BasicGUI_VectorDlg::enterEvent( QEvent* ) //================================================================================= void BasicGUI_VectorDlg::ValueChangedInSpinBox( double newValue ) { - displayPreview(); + displayPreview(true); } //================================================================================= @@ -385,7 +385,7 @@ void BasicGUI_VectorDlg::ReverseVector( int state ) GroupDimensions->SpinBox_DY->setValue( dy ); GroupDimensions->SpinBox_DZ->setValue( dz ); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index bce28ee1e..08c9925b7 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -402,7 +402,7 @@ void BasicGUI_WorkingPlaneDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); // SelectionIntoArgument(); send->setDown(true); - displayPreview(); + displayPreview(true); } diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx index 0677b115f..43c351dca 100644 --- a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx @@ -307,7 +307,7 @@ void BlocksGUI_BlockDlg::SelectionIntoArgument() myEditCurrentArgument->setText( "" ); } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -402,7 +402,7 @@ void BlocksGUI_BlockDlg::ActivateThisDialog() localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE); //Select Faces on All Shapes connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx index 008525609..40e47c62e 100644 --- a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx @@ -328,7 +328,7 @@ void BlocksGUI_QuadFaceDlg::SelectionIntoArgument() myEditCurrentArgument->setText( "" ); } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -411,7 +411,7 @@ void BlocksGUI_QuadFaceDlg::ActivateThisDialog() activateSelection(); // ?? - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index bb85389b8..0b9547a11 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -118,6 +118,8 @@ void BlocksGUI_TrsfDlg::Init() initSpinBox(anIter.value(), 1, 999, SpecificStep); } + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -270,7 +272,7 @@ void BlocksGUI_TrsfDlg::SelectionIntoArgument() } myEditCurrentArgument->setText(aName); myFaces[aCurrFocus] = anIndex; - displayPreview(); + processPreview(); } switch (aCurrFocus) { @@ -388,7 +390,7 @@ void BlocksGUI_TrsfDlg::ActivateThisDialog() activateSelection(); // ?? - displayPreview(); + processPreview(); } //================================================================================= @@ -407,7 +409,7 @@ void BlocksGUI_TrsfDlg::enterEvent (QEvent*) //================================================================================= void BlocksGUI_TrsfDlg::ValueChangedInSpinBox(int) { - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index e9c90ce5d..5ccde57fd 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -263,7 +263,7 @@ void BooleanGUI_Dialog::ActivateThisDialog() connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index 3efc455a3..431c4317f 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -102,6 +102,7 @@ void BuildGUI_CompoundDlg::Init() myShapes.clear(); mainFrame()->GroupBoxPublish->show(); + mainFrame()->CheckBoxPreview->hide(); /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index c92ea226a..72aa73a6b 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -239,7 +239,7 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument() if (myEditCurrentArgument == GroupPoints->LineEdit1) myPoint1.nullify(); else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2.nullify(); else if (myEditCurrentArgument == GroupWire->LineEdit1) myWire.nullify(); - displayPreview(); + displayPreview(true); return; } @@ -268,7 +268,7 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -297,7 +297,7 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument() myEditCurrentArgument->setEnabled(true); myEditCurrentArgument->setFocus(); send->setDown(true); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.ui b/src/DlgRef/DlgRef_Skeleton_QTD.ui index 14081c255..4b52e61a2 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.ui +++ b/src/DlgRef/DlgRef_Skeleton_QTD.ui @@ -136,6 +136,13 @@ + + + + + + + @@ -218,6 +225,7 @@ CheckBoxRestoreSS CheckBoxAddPrefix + CheckBoxPreview buttonOk buttonApply buttonCancel diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 81f411084..07e96b59d 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -248,13 +248,19 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, // Function : displayPreview // Purpose : Method for displaying preview based on execute() results //================================================================ -void GEOMBase_Helper::displayPreview( const bool activate, +void GEOMBase_Helper::displayPreview( const bool display, + const bool activate, const bool update, const bool toRemoveFromEngine, const double lineWidth, const int displayMode, const int color ) { + if(!display) { + erasePreview( update ); + return; + } + isPreview = true; QString msg; if ( !isValid( msg ) ) diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h index 4faf7b88c..7da492021 100755 --- a/src/GEOMBase/GEOMBase_Helper.h +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -72,7 +72,8 @@ protected: void redisplay ( const ObjectList&, const bool = true, const bool = true ); void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true ); - virtual void displayPreview ( const bool activate = false, + virtual void displayPreview ( const bool display, + const bool activate = false, const bool update = true, const bool toRemoveFromEngine = true, const double lineWidth = -1, diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 761558e15..eeb22969c 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -73,6 +73,7 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare myMainFrame->GroupBoxPublish->setTitle( tr( "GEOM_PUBLISH_RESULT_GRP" ) ); myMainFrame->CheckBoxRestoreSS->setText( tr( "GEOM_RESTORE_SUB_SHAPES" ) ); myMainFrame->CheckBoxAddPrefix->setText( tr( "GEOM_RSS_ADD_FREFIX" ) ); + myMainFrame->CheckBoxPreview->setText( tr("GEOM_PREVIEW") ); buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) ); buttonOk()->setText( tr( "GEOM_BUT_APPLY_AND_CLOSE" ) ); @@ -125,6 +126,8 @@ void GEOMBase_Skeleton::Init() // connect help button on a private slot that displays help information connect( buttonHelp(), SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) ); + connect( myMainFrame->CheckBoxPreview, SIGNAL(toggled(bool)), this, SLOT(processPreview()) ); + /* displays Dialog */ myMainFrame->RadioButton1->setChecked( true ); myMainFrame->RadioButton4->hide(); @@ -132,6 +135,11 @@ void GEOMBase_Skeleton::Init() myMainFrame->CheckBoxRestoreSS->setChecked( false ); myMainFrame->CheckBoxAddPrefix->setChecked( true ); + + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + bool aPrv = (resMgr == 0) ? false : resMgr->booleanValue( "Geometry", "geom_preview", false ); + + myMainFrame->CheckBoxPreview->setChecked( aPrv ); myMainFrame->GroupBoxPublish->hide(); } @@ -409,3 +417,22 @@ void GEOMBase_Skeleton::keyPressEvent( QKeyEvent* e ) ClickOnHelp(); } } + +//================================================================================= +// function : showOnlyPreviewControl() +// purpose : display only CheckBoxPreview check box, +// hide CheckBoxRestoreSS and CheckBoxAddPrefix +//================================================================================= +void GEOMBase_Skeleton::showOnlyPreviewControl(){ + mainFrame()->GroupBoxPublish->show(); + mainFrame()->CheckBoxRestoreSS->hide(); + mainFrame()->CheckBoxAddPrefix->hide(); +} + +//================================================================================= +// function : processPreview() +// purpose : Display preview if CheckBoxPreview is checked +//================================================================================= +void GEOMBase_Skeleton::processPreview() { + displayPreview(mainFrame()->CheckBoxPreview->isChecked()); +} diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index f9c4a7400..9e4067de1 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -86,6 +86,8 @@ protected: */ void unsetConstructorId(); + void showOnlyPreviewControl(); + void setHelpFileName( const QString& ); DlgRef_Skeleton* mainFrame(); @@ -105,6 +107,7 @@ protected: protected slots: virtual void ClickOnCancel(); + virtual void processPreview(); void LineEditReturnPressed(); void DeactivateActiveDialog(); void ActivateThisDialog(); diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index e462aca01..4215459aa 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -2721,6 +2721,10 @@ Please, select face, shell or solid and try again PREF_GROUP_ORIGIN_AND_BASE_VECTORS Origin and base vectors + + PREF_GROUP_OPERATIONS + Operations + PREF_GROUP_GENERAL General @@ -4117,6 +4121,10 @@ Please, select face, shell or solid and try again GEOM_RSS_ADD_FREFIX Add prefix to names of restored subshapes + + GEOM_PREVIEW + Preview + GEOM_ALL_IMPORT_FILES All supported formats ( %1 ) diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index c306237a4..b7b0bcc28 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -1196,7 +1196,6 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) if ( !res ) return false; - setMenuShown( true ); setToolShown( true ); @@ -1637,6 +1636,13 @@ void GeometryGUI::createPreferences() addPreference( tr( "PREF_AUTO_CREATE" ), originGroup, LightApp_Preferences::Bool, "Geometry", "auto_create_base_objects" ); + + int operationsGroup = addPreference( tr( "PREF_GROUP_OPERATIONS" ), tabId ); + setPreferenceProperty( operationsGroup, "columns", 2 ); + + addPreference( tr( "GEOM_PREVIEW" ), operationsGroup, + LightApp_Preferences::Bool, "Geometry", "geom_preview" ); + } void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 7223d4b1d..66f132050 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -126,6 +126,8 @@ void GenerationGUI_FillingDlg::Init() GroupPoints->ComboBox1->addItem(tr("GEOM_FILLING_USEORI")); GroupPoints->ComboBox1->addItem(tr("GEOM_FILLING_AUTO")); + showOnlyPreviewControl(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -211,7 +213,7 @@ void GenerationGUI_FillingDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -242,7 +244,7 @@ void GenerationGUI_FillingDlg::ActivateThisDialog() connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_COMPOUND ); - displayPreview(); + processPreview(); } @@ -263,7 +265,7 @@ void GenerationGUI_FillingDlg::enterEvent( QEvent* ) //================================================================================= void GenerationGUI_FillingDlg::ValueChangedInSpinBox( double newValue ) { - displayPreview(); + processPreview(); } //================================================================================= @@ -272,7 +274,7 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox( double newValue ) //================================================================================= void GenerationGUI_FillingDlg::MethodChanged() { - displayPreview(); + processPreview(); } //================================================================================= @@ -281,7 +283,7 @@ void GenerationGUI_FillingDlg::MethodChanged() //================================================================================= void GenerationGUI_FillingDlg::ApproxChanged() { - displayPreview(); + processPreview(); } diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index 1b75a21ab..e8cee7957 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -119,6 +119,8 @@ void GenerationGUI_PipeDlg::Init() GroupPoints->CheckButton1->setEnabled(false); + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -172,7 +174,7 @@ void GenerationGUI_PipeDlg::ConstructorsClicked( int constructorId ) resize(100,100); SelectionIntoArgument(); - displayPreview(); + processPreview(); } //================================================================================= @@ -195,7 +197,7 @@ void GenerationGUI_PipeDlg::SelectionTypeButtonClicked() myEditCurrentArgument->setText(""); myPath.nullify(); } - displayPreview(); + processPreview(); } //================================================================================= @@ -275,7 +277,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -327,7 +329,7 @@ void GenerationGUI_PipeDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index d51cdd648..db3db9acd 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -195,6 +195,8 @@ void GenerationGUI_PrismDlg::Init() myPoint2.nullify(); myVec.nullify(); + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -290,7 +292,7 @@ void GenerationGUI_PrismDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + processPreview(); } //================================================================================= @@ -382,7 +384,7 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -442,7 +444,7 @@ void GenerationGUI_PrismDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -475,7 +477,7 @@ void GenerationGUI_PrismDlg::enterEvent (QEvent*) //================================================================================= void GenerationGUI_PrismDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= @@ -550,7 +552,7 @@ void GenerationGUI_PrismDlg::onBothway() GroupDXDYDZ->SpinBox_SC->setEnabled(!GroupDXDYDZ->CheckBox1->isChecked() && GroupDXDYDZ->CheckBox2->isChecked()); // scale factor - displayPreview(); + processPreview(); } //================================================================================= @@ -568,7 +570,7 @@ void GenerationGUI_PrismDlg::onScalePrism() GroupDXDYDZ->TextLabel5->setEnabled(GroupDXDYDZ->CheckBox2->isChecked()); GroupDXDYDZ->SpinBox_SC->setEnabled(GroupDXDYDZ->CheckBox2->isChecked()); - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 837165e6d..d92ab0d5f 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -122,6 +122,8 @@ void GenerationGUI_RevolDlg::Init() myBaseObjects.clear(); myAxis.nullify(); + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -209,7 +211,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument() GroupPoints->PushButton1->click(); } } - displayPreview(); + processPreview(); } //================================================================================= @@ -243,7 +245,7 @@ void GenerationGUI_RevolDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -256,7 +258,7 @@ void GenerationGUI_RevolDlg::ActivateThisDialog() connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - displayPreview(); + processPreview(); } //================================================================================= @@ -275,7 +277,7 @@ void GenerationGUI_RevolDlg::enterEvent (QEvent*) //================================================================================= void GenerationGUI_RevolDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= @@ -350,7 +352,7 @@ void GenerationGUI_RevolDlg::onReverse() void GenerationGUI_RevolDlg::onBothway() { GroupPoints->CheckButton2->setEnabled(!GroupPoints->CheckButton1->isChecked()); - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index 32b812011..64abfa8df 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -180,7 +180,7 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument() myObj = aSelectedObject; processObject(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -221,7 +221,7 @@ void MeasureGUI_CenterMassDlg::ActivateThisDialog() SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -250,7 +250,7 @@ void MeasureGUI_CenterMassDlg::processObject() myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( y, aPrecision ) ); myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( z, aPrecision ) ); - displayPreview(); + displayPreview(true); } } diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx index 549542d29..61b342c0a 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx @@ -188,7 +188,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::SelectionIntoArgument() myObj = aSelectedObject; myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); processObject(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -228,7 +228,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::ActivateThisDialog() connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); activateSelection(); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx index 220a0c043..b4c9635f7 100644 --- a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx @@ -246,7 +246,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument() GroupArgs->PushButton1->click(); } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -286,7 +286,7 @@ void MeasureGUI_NormaleDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -313,7 +313,7 @@ void MeasureGUI_NormaleDlg::ActivateThisDialog() connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index ac94da8a2..9ba48d135 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -111,6 +111,8 @@ void OperationGUI_ArchimedeDlg::Init() initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, "density_precision" ); initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, "parametric_precision" ); + showOnlyPreviewControl(); + GroupPoints->SpinBox_DX->setValue( 100.0 ); GroupPoints->SpinBox_DY->setValue( 1.0 ); GroupPoints->SpinBox_DZ->setValue( 0.01 ); @@ -125,6 +127,11 @@ void OperationGUI_ArchimedeDlg::Init() connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double))); initName( tr( "GEOM_ARCHIMEDE" ) ); @@ -194,8 +201,8 @@ void OperationGUI_ArchimedeDlg::SelectionIntoArgument() myShape = GEOM::GEOM_Object::_nil(); return; } - myEditCurrentArgument->setText(GEOMBase::GetName(myShape)); + processPreview(); } //================================================================================= @@ -223,6 +230,7 @@ void OperationGUI_ArchimedeDlg::ActivateThisDialog() globalSelection( GEOM_ALLSHAPES ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + processPreview(); } @@ -288,3 +296,12 @@ bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects ) return true; } + +//================================================================================= +// function : ValueChangedInSpinBox() +// purpose : +//================================================================================= +void OperationGUI_ArchimedeDlg::ValueChangedInSpinBox(double newValue) +{ + processPreview(); +} diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.h b/src/OperationGUI/OperationGUI_ArchimedeDlg.h index 30d8aab9a..0ee8ed98f 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.h +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.h @@ -65,6 +65,7 @@ private slots: void LineEditReturnPressed(); void SelectionIntoArgument(); void SetDoubleSpinBoxStep( double ); + void ValueChangedInSpinBox( double ); }; #endif // OPERATIONGUI_ARCHIMEDEDLG_H diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index ccfc070c1..2b6a1a1f5 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -193,6 +193,8 @@ void OperationGUI_ChamferDlg::Init() myFace[ Face1 ] = -1; myFace[ Face2 ] = -1; + showOnlyPreviewControl(); + // signals and slots connections // main buttons @@ -354,7 +356,7 @@ void OperationGUI_ChamferDlg::ConstructorsClicked (int constructorId) myEditCurrentArgument->setText(""); } - displayPreview(); + processPreview(); } qApp->processEvents(); @@ -421,7 +423,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument() if ( !anObj->_is_nil() ) { myShape = anObj; myEditCurrentArgument->setText(GEOMBase::GetName(anObj)); - displayPreview(); + processPreview(); } } @@ -444,7 +446,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument() QString aFaceName = QString(GEOMBase::GetName(anObj)) + ":%1"; myEditCurrentArgument->setText(aFaceName.arg(anIndex)); myFace[ aCurrFocus ] = anIndex; - displayPreview(); + processPreview(); } } } @@ -479,7 +481,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument() else if (aConstructorId == 3) myEdges = anIndexes; - displayPreview(); + processPreview(); } } } @@ -567,7 +569,7 @@ void OperationGUI_ChamferDlg::SetEditCurrentArgument() activateSelection(); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -615,7 +617,7 @@ void OperationGUI_ChamferDlg::enterEvent (QEvent*) //================================================================================= void OperationGUI_ChamferDlg::ValueChangedInSpinBox (double) { - displayPreview(); + processPreview(); } //================================================================================= @@ -960,5 +962,5 @@ void OperationGUI_ChamferDlg::RadioButtonPressed() myRadioButton[ RadioButton41 ]->blockSignals(false); myRadioButton[ RadioButton42 ]->blockSignals(false); - displayPreview(); + processPreview(); } diff --git a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx index a22141dde..f9407e815 100644 --- a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx +++ b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx @@ -120,6 +120,8 @@ void OperationGUI_Fillet1d2dDlg::Init() myVertexes.Clear(); + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk() )); @@ -221,7 +223,7 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument() myShape = anObj; myEditCurrentArgument->setText(aName ); - displayPreview(); + processPreview(); } } } else if (myEditCurrentArgument == GroupVertexes->LineEdit2) { @@ -251,7 +253,7 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument() } } if ( isPreview ) - displayPreview(); + processPreview(); } if (myEditCurrentArgument == GroupVertexes->LineEdit1) { @@ -288,7 +290,7 @@ void OperationGUI_Fillet1d2dDlg::SetEditCurrentArgument() activateSelection(); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -334,7 +336,7 @@ void OperationGUI_Fillet1d2dDlg::enterEvent (QEvent*) //================================================================================= void OperationGUI_Fillet1d2dDlg::ValueChangedInSpinBox (double) { - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 8295c2178..8a464ef4e 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -160,6 +160,8 @@ void OperationGUI_FilletDlg::Init() myFaces.Clear(); myEdges.Clear(); + showOnlyPreviewControl(); + // signals and slots connections // main buttons @@ -292,7 +294,7 @@ void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId) else myEditCurrentArgument->setText(""); - displayPreview(); + processPreview(); } qApp->processEvents(); @@ -351,7 +353,7 @@ void OperationGUI_FilletDlg::SelectionIntoArgument() if ( !anObj->_is_nil() ) { myShape = anObj; myEditCurrentArgument->setText(GEOMBase::GetName(anObj)); - displayPreview(); + processPreview(); } } @@ -389,7 +391,7 @@ void OperationGUI_FilletDlg::SelectionIntoArgument() else myFaces = anIndexes; - displayPreview(); + processPreview(); } } } @@ -476,7 +478,7 @@ void OperationGUI_FilletDlg::SetEditCurrentArgument() activateSelection(); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -528,7 +530,7 @@ void OperationGUI_FilletDlg::enterEvent (QEvent*) //================================================================================= void OperationGUI_FilletDlg::ValueChangedInSpinBox (double) { - displayPreview(); + processPreview(); } //================================================================================= @@ -749,5 +751,5 @@ void OperationGUI_FilletDlg::RadioButtonClicked() Group3->RadioButton1->blockSignals(false); Group3->RadioButton2->blockSignals(false); - displayPreview(); + processPreview(); } diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx index dd2b7225a..b5637bd97 100644 --- a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx @@ -114,6 +114,8 @@ void OperationGUI_GetShapesOnShapeDlg::Init() GroupPoints->LineEdit2->clear(); myObject1 = myObject2 = GEOM::GEOM_Object::_nil(); + showOnlyPreviewControl(); + // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -211,6 +213,7 @@ void OperationGUI_GetShapesOnShapeDlg::SelectionIntoArgument() } } } + processPreview(); } //================================================================================= @@ -265,6 +268,7 @@ void OperationGUI_GetShapesOnShapeDlg::ActivateThisDialog() globalSelection(GEOM_ALLSHAPES); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + processPreview(); } //================================================================================= @@ -346,4 +350,5 @@ void OperationGUI_GetShapesOnShapeDlg::ComboTextChanged() { // VRS ???? What is it for ??? commented for a while... //bool IsEnabled = GroupPoints->ComboBox1->currentIndex() < 3; + processPreview(); } diff --git a/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx b/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx index 2d483cae7..de210bd5d 100644 --- a/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx +++ b/src/OperationGUI/OperationGUI_GetSharedShapesDlg.cxx @@ -114,6 +114,8 @@ void OperationGUI_GetSharedShapesDlg::Init() GroupPoints->ComboBox1->setCurrentIndex(0); + showOnlyPreviewControl(); + /* signals and slots connections */ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -212,6 +214,7 @@ void OperationGUI_GetSharedShapesDlg::SelectionIntoArgument() return; myEditCurrentArgument->setText(aString); + processPreview(); } //================================================================================= @@ -245,6 +248,7 @@ void OperationGUI_GetSharedShapesDlg::ActivateThisDialog() SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); ConstructorsClicked(getConstructorId()); + processPreview(); } //================================================================================= @@ -265,6 +269,7 @@ void OperationGUI_GetSharedShapesDlg::ComboTextChanged() { //initName(getNewObjectName()); initName(getPrefixByType()); + processPreview(); } //================================================================================= diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index b51953f18..fcf94afc6 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -151,6 +151,9 @@ void OperationGUI_PartitionDlg::Init() connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + connect( GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(processPreview()) ); + connect( GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(processPreview()) ); initName( tr( "GEOM_PARTITION" ) ); @@ -318,8 +321,9 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument() } } } - + myEditCurrentArgument->setText( aString ); + processPreview(); } @@ -352,6 +356,7 @@ void OperationGUI_PartitionDlg::SetEditCurrentArgument() myEditCurrentArgument->setFocus(); SelectionIntoArgument(); send->setDown(true); + processPreview(); } @@ -382,6 +387,7 @@ void OperationGUI_PartitionDlg::ActivateThisDialog() SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); + processPreview(); } @@ -496,6 +502,7 @@ void OperationGUI_PartitionDlg::ComboTextChanged() //GroupPoints->TextLabel5->setEnabled(IsEnabled); //GroupPoints->PushButton3->setEnabled(IsEnabled); //GroupPoints->PushButton4->setEnabled(IsEnabled); + processPreview(); } //================================================================================= diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index a5a400628..e68df444a 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -184,7 +184,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId) disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); globalSelection(); // close local contexts, if any - displayPreview(); + displayPreview(true); break; } } @@ -194,7 +194,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -269,7 +269,7 @@ void PrimitiveGUI_BoxDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -311,7 +311,7 @@ void PrimitiveGUI_BoxDlg::SetEditCurrentArgument() this, SLOT(SelectionIntoArgument())); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -326,7 +326,7 @@ void PrimitiveGUI_BoxDlg::ActivateThisDialog() connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -345,7 +345,7 @@ void PrimitiveGUI_BoxDlg::enterEvent (QEvent*) //================================================================================= void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 1f02d00b2..6f145edb5 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -200,7 +200,7 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId) disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); globalSelection(); // close local contexts, if any - displayPreview(); + displayPreview(true); break; } } @@ -210,7 +210,7 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -286,7 +286,7 @@ void PrimitiveGUI_ConeDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -326,7 +326,7 @@ void PrimitiveGUI_ConeDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -359,7 +359,7 @@ void PrimitiveGUI_ConeDlg::enterEvent (QEvent*) //================================================================================= void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index cff112c7a..22b3ceb62 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -202,7 +202,7 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -280,7 +280,7 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -320,7 +320,7 @@ void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -353,7 +353,7 @@ void PrimitiveGUI_CylinderDlg::enterEvent (QEvent*) //================================================================================= void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx index 07bbd4cc6..37036ecfd 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx @@ -201,7 +201,7 @@ void PrimitiveGUI_DiskDlg::RadioButtonClicked() myOrientationType = 2; else if (GroupOrientation->RadioButton3->isChecked()) myOrientationType = 3; - displayPreview(); + displayPreview(true); } //================================================================================= @@ -251,7 +251,7 @@ void PrimitiveGUI_DiskDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -345,7 +345,7 @@ void PrimitiveGUI_DiskDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -412,7 +412,7 @@ void PrimitiveGUI_DiskDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -444,7 +444,7 @@ void PrimitiveGUI_DiskDlg::enterEvent (QEvent*) //================================================================================= void PrimitiveGUI_DiskDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index 2cb125bbb..88d10af04 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -198,7 +198,7 @@ void PrimitiveGUI_FaceDlg::SetDoubleSpinBoxStep( double step ) //================================================================================= void PrimitiveGUI_FaceDlg::ValueChangedInSpinBox( double newValue ) { - displayPreview(); + displayPreview(true); } //================================================================================= @@ -213,7 +213,7 @@ void PrimitiveGUI_FaceDlg::RadioButtonClicked() myOrientationType = 2; else if ( GroupOrientation->RadioButton3->isChecked() ) myOrientationType = 3; - displayPreview(); + displayPreview(true); } //================================================================================= @@ -306,7 +306,7 @@ void PrimitiveGUI_FaceDlg::ConstructorsClicked( int constructorId ) updateGeometry(); resize( minimumSizeHint() ); SelectionIntoArgument(); - //displayPreview(); + //displayPreview(true); } //================================================================================= @@ -316,7 +316,7 @@ void PrimitiveGUI_FaceDlg::ConstructorsClicked( int constructorId ) void PrimitiveGUI_FaceDlg::SelectionIntoArgument() { if (getConstructorId() == 0) { - displayPreview(); + displayPreview(true); return; } @@ -345,7 +345,7 @@ void PrimitiveGUI_FaceDlg::SelectionIntoArgument() myFace = aSelectedObject; } - displayPreview(); + displayPreview(true); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index fab3651b2..84230fdc6 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -194,7 +194,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId ) resize( minimumSizeHint() ); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } @@ -252,7 +252,7 @@ void PrimitiveGUI_SphereDlg::SelectionIntoArgument() myPoint = aSelectedObject; } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -314,7 +314,7 @@ void PrimitiveGUI_SphereDlg::enterEvent( QEvent* ) //================================================================================= void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index f709fd9a2..22f51aa04 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -200,7 +200,7 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId) resize(minimumSizeHint()); SelectionIntoArgument(); - displayPreview(); + displayPreview(true); } //================================================================================= @@ -276,7 +276,7 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument() } } - displayPreview(); + displayPreview(true); } //================================================================================= @@ -316,7 +316,7 @@ void PrimitiveGUI_TorusDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + displayPreview(true); } //================================================================================= @@ -349,7 +349,7 @@ void PrimitiveGUI_TorusDlg::enterEvent (QEvent*) //================================================================================= void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox() { - displayPreview(); + displayPreview(true); } //================================================================================= diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index e1f233113..1dd8f39cd 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -157,6 +157,8 @@ void RepairGUI_GlueDlg::Init() //globalSelection( GEOM_COMPOUND ); mainFrame()->GroupBoxPublish->show(); + //Hide preview checkbox + mainFrame()->CheckBoxPreview->hide(); /* signals and slots connections */ connect( buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -237,7 +239,7 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId ) updateGeometry(); resize( minimumSizeHint() ); - displayPreview(); + processPreview(); updateButtonState(); activateSelection(); SelectionIntoArgument(); diff --git a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx index ecebe2dfb..b3038b1ca 100644 --- a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx +++ b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx @@ -123,6 +123,8 @@ void RepairGUI_LimitToleranceDlg::Init() //globalSelection(GEOM_COMPOUND); mainFrame()->GroupBoxPublish->show(); + //Hide preview checkbox + mainFrame()->CheckBoxPreview->hide(); /* signals and slots connections */ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx index c4f0c1038..13d07ad43 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -107,6 +107,8 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() activateSelection(); mainFrame()->GroupBoxPublish->show(); + //Hide preview checkbox + mainFrame()->CheckBoxPreview->hide(); /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index 9403ec765..d68177af1 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -112,6 +112,8 @@ void RepairGUI_SuppressFacesDlg::Init() myFacesInd->length(0); mainFrame()->GroupBoxPublish->show(); + //Hide preview checkbox + mainFrame()->CheckBoxPreview->hide(); // signals and slots connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 5c1c58f60..7911cc99e 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -171,7 +171,7 @@ void TransformationGUI_MirrorDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -243,7 +243,7 @@ void TransformationGUI_MirrorDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -292,7 +292,7 @@ void TransformationGUI_MirrorDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 8eaa48d1a..11c78050c 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -252,7 +252,7 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -334,7 +334,7 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument() myEditCurrentArgument->setText(""); } - displayPreview(); + processPreview(); } //================================================================================= @@ -386,7 +386,7 @@ void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -437,7 +437,7 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox (double newValue) else if (send == GroupDimensions->SpinBox_DX2) myStep = newValue; - displayPreview(); + processPreview(); } //================================================================================= @@ -453,7 +453,7 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox (int newValue) else if (send == GroupDimensions->SpinBox_DY2) myNbTimes2 = newValue; - displayPreview(); + processPreview(); } //================================================================================= @@ -469,7 +469,7 @@ void TransformationGUI_MultiRotationDlg::ReverseAngle() if (aConstructorId == 1) GroupDimensions->SpinBox_DX1->setValue(myAng); - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 7f51a8bc2..b98a86023 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -282,7 +282,7 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked (int constructor SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -378,7 +378,7 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() myEditCurrentArgument->setText(""); } - displayPreview(); + processPreview(); } //================================================================================= @@ -444,7 +444,7 @@ void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -524,7 +524,7 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox (double newVal break; } - displayPreview(); + processPreview(); } //================================================================================= @@ -547,7 +547,7 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox (int newValue) break; } - displayPreview(); + processPreview(); } //================================================================================= @@ -565,7 +565,7 @@ void TransformationGUI_MultiTranslationDlg::ReverseStepU() else if (aConstructorId == 1) GroupDimensions->SpinBox_DX1->setValue(myStepU); - displayPreview(); + processPreview(); } //================================================================================= @@ -578,7 +578,7 @@ void TransformationGUI_MultiTranslationDlg::ReverseStepV() GroupDimensions->SpinBox_DX2->setValue(myStepV); - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 1cc024fd4..5f7717806 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -176,7 +176,7 @@ void TransformationGUI_OffsetDlg::SelectionIntoArgument() myEditCurrentArgument->setText(""); } - displayPreview(); + processPreview(); } @@ -229,7 +229,7 @@ void TransformationGUI_OffsetDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_OffsetDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index dba5e1566..65fa99e15 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -248,7 +248,7 @@ void TransformationGUI_PositionDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -274,7 +274,7 @@ void TransformationGUI_PositionDlg::SelectionTypeButtonClicked() //================================================================================= void TransformationGUI_PositionDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= @@ -369,7 +369,7 @@ void TransformationGUI_PositionDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -460,7 +460,7 @@ void TransformationGUI_PositionDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 7a50853d3..b17cd3ecf 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -215,7 +215,7 @@ void TransformationGUI_RotationDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -328,7 +328,7 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -401,7 +401,7 @@ void TransformationGUI_RotationDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -443,7 +443,7 @@ void TransformationGUI_RotationDlg::TextValueChangedInSpinBox( const QString& s) //================================================================================= void TransformationGUI_RotationDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 1e08c0f92..522435363 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -235,7 +235,7 @@ void TransformationGUI_ScaleDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -304,7 +304,7 @@ void TransformationGUI_ScaleDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -342,7 +342,7 @@ void TransformationGUI_ScaleDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -374,7 +374,7 @@ void TransformationGUI_ScaleDlg::enterEvent (QEvent*) //================================================================================= void TransformationGUI_ScaleDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index f7e67030e..61da5756b 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -261,7 +261,7 @@ void TransformationGUI_TranslationDlg::ConstructorsClicked (int constructorId) SelectionIntoArgument(); } else { - displayPreview(); + processPreview(); } } @@ -356,7 +356,7 @@ void TransformationGUI_TranslationDlg::SelectionIntoArgument() } } - displayPreview(); + processPreview(); } //================================================================================= @@ -411,7 +411,7 @@ void TransformationGUI_TranslationDlg::SetEditCurrentArgument() send->setDown(true); // seems we need it only to avoid preview disappearing, caused by selection mode change - displayPreview(); + processPreview(); } //================================================================================= @@ -443,7 +443,7 @@ void TransformationGUI_TranslationDlg::enterEvent (QEvent*) //================================================================================= void TransformationGUI_TranslationDlg::ValueChangedInSpinBox() { - displayPreview(); + processPreview(); } //================================================================================= @@ -639,7 +639,7 @@ void TransformationGUI_TranslationDlg::CreateCopyModeChanged() void TransformationGUI_TranslationDlg::ActivateDistanceChanged() { GroupPoints->SpinBox3->setEnabled( GroupPoints->CheckBox1->isChecked() ); - displayPreview(); + processPreview(); } //=================================================================================