Salome HOME
Task 2.5. Combination operations on Groups (issue #2935)
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.cpp
index aea6f47f19d9ad689588426ad181a424111f6f96..231c512fa895b2770608c9b24c5c84b1e9240fd0 100644 (file)
@@ -167,7 +167,9 @@ myIsSelection(false)
     if (toShowConstraints.contains(aState))
       aShowConstraints->setChecked(toShowConstraints[aState]);
   }
-
+  myShowPoints = new QCheckBox(tr("Show free points"), this);
+  connect(myShowPoints, SIGNAL(toggled(bool)), this, SIGNAL(showFreePoints(bool)));
+  aLayout->addWidget(myShowPoints);
 
   QPushButton* aPlaneBtn = new QPushButton(tr("Change sketch plane"), aSecondWgt);
   connect(aPlaneBtn, SIGNAL(clicked(bool)), SLOT(onChangePlane()));
@@ -312,11 +314,8 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
         isSetSizeOfView = false;
       }
     }
-    if (isSetSizeOfView)
-      aModule->sketchMgr()->previewSketchPlane()->setSizeOfView(aSizeOfView, true);
+    aModule->sketchMgr()->previewSketchPlane()->setSizeOfView(aSizeOfView, isSetSizeOfView);
     aModule->sketchMgr()->previewSketchPlane()->createSketchPlane(aSketch, myWorkshop);
-    if (isSetSizeOfView)
-      aModule->sketchMgr()->previewSketchPlane()->setSizeOfView(aSizeOfView, false);
   }
   // 2. if the planes were displayed, change the view projection
 
@@ -695,7 +694,14 @@ void PartSet_WidgetSketchLabel::onChangePlane()
     aWorkshop->selectionActivate()->updateSelectionModes();
 
     SessionPtr aMgr = ModelAPI_Session::get();
-    aMgr->startOperation();
+    aMgr->startOperation("Change Sketch plane");
     myOpenTransaction = true;
   }
-}
\ No newline at end of file
+}
+
+void PartSet_WidgetSketchLabel::setShowPointsState(bool theState)
+{
+  bool aBlock = myShowPoints->blockSignals(true);
+  myShowPoints->setChecked(theState);
+  myShowPoints->blockSignals(aBlock);
+}