use_subshapes="true"
concealment="true"
/>
- <!-- In order to avoid automatic closing of operation -->
- <label id="" label="" internal="1"/>
</source>
void ModuleBase_Operation::resume()
{
- if (myPropertyPanel)
- connect(myPropertyPanel, SIGNAL(noMoreWidgets()), SLOT(commit()));
// connect(myPropertyPanel, SIGNAL(widgetActivated(ModuleBase_ModelWidget*)),
// this, SLOT(onWidgetActivated(ModuleBase_ModelWidget*)));
emit resumed();
myPropertyPanel->setEditingMode(isEditOperation());
//connect(myPropertyPanel, SIGNAL(widgetActivated(ModuleBase_ModelWidget*)), this,
// SLOT(onWidgetActivated(ModuleBase_ModelWidget*)));
- if (myPropertyPanel) {
- connect(myPropertyPanel, SIGNAL(noMoreWidgets()), SLOT(commit()));
- }
}
bool ModuleBase_Operation::isGranted(QString theId) const
myRestartingMode = RM_LastFeatureEmpty;
}
+void PartSet_Module::onNoMoreWidgets()
+{
+ ModuleBase_Operation* aOperation = myWorkshop->currentOperation();
+ if (aOperation) {
+ /// Restart sketcher operations automatically
+ FeaturePtr aFeature = aOperation->feature();
+ std::shared_ptr<SketchPlugin_Feature> aSPFeature =
+ std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+ if (aSPFeature) {
+ aOperation->commit();
+ }
+ }
+}
+
QStringList PartSet_Module::sketchOperationIdList() const
{
QStringList aIds;
QStringList sketchOperationIdList() const;
+public slots:
+ /// SLOT, that is called by no more widget signal emitted by property panel
+ /// Set a specific flag to restart the sketcher operation
+ void onNoMoreWidgets();
+
protected slots:
/// Called when previous operation is finished
virtual void onOperationComitted(ModuleBase_Operation* theOperation);
aDesktop->addDockWidget(Qt::LeftDockWidgetArea, aObjDock);
myPropertyPanel = new XGUI_PropertyPanel(aDesktop);
myPropertyPanel->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
+
+ connect(myPropertyPanel, SIGNAL(noMoreWidgets()), myModule, SLOT(onNoMoreWidgets()));
+
aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
hidePropertyPanel(); //<! Invisible by default
hideObjectBrowser();