+void PartSet_OperationSketchBase::mouseDoubleClick(
+ QMouseEvent* theEvent, Handle_V3d_View theView,
+ const std::list<ModuleBase_ViewerPrs>& theSelected,
+ const std::list<ModuleBase_ViewerPrs>& theHighlighted)
+{
+}
+
+void PartSet_OperationSketchBase::restartOperation(const std::string& theType, ObjectPtr theFeature)
+{
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theFeature);
+ if (aFeature) {
+ QStringList aNested = this->nestedFeatures();
+ if (!aNested.isEmpty()) {
+ if (!aNested.contains(QString(aFeature->getKind().c_str())))
+ return;
+ }
+ }
+ emit restartRequired(theType, theFeature);
+}
+
+
+
+void PartSet_OperationSketchBase::activateByPreselection()
+{
+ if (!myPropertyPanel)
+ return;
+ ModuleBase_ModelWidget* aActiveWgt = myPropertyPanel->activeWidget();
+ if ((myPreSelection.size() > 0) && aActiveWgt) {
+ const ModuleBase_ViewerPrs& aPrs = myPreSelection.front();
+ ModuleBase_WidgetValueFeature aValue;
+ aValue.setObject(aPrs.object());
+ if (aActiveWgt->setValue(&aValue)) {
+ myPreSelection.remove(aPrs);
+ if(isValid()) {
+ //myActiveWidget = NULL;
+ commit();
+ } else {
+ myPropertyPanel->activateNextWidget();
+ //emit activateNextWidget(myActiveWidget);
+ }
+ }
+ // If preselection is enough to make a valid feature - apply it immediately
+ }
+}