1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #include "PartSet_SketcherReetntrantMgr.h"
4 #include "PartSet_Module.h"
5 #include "PartSet_SketcherMgr.h"
6 #include "PartSet_WidgetPoint2d.h"
8 #include "ModelAPI_Session.h"
9 #include "ModelAPI_AttributeString.h"
10 #include "ModelAPI_AttributeRefAttr.h"
12 #include "GeomDataAPI_Point2D.h"
14 #include <ModuleBase_IPropertyPanel.h>
15 #include <ModuleBase_OperationFeature.h>
16 #include <ModuleBase_ModelWidget.h>
17 #include <ModuleBase_ViewerPrs.h>
18 #include <ModuleBase_WidgetSelector.h>
19 #include <ModuleBase_PageWidget.h>
20 #include <ModuleBase_PageBase.h>
21 #include <ModuleBase_WidgetFactory.h>
22 #include <ModuleBase_OperationDescription.h>
23 #include "ModuleBase_ToolBox.h"
25 #include <SketchPlugin_Feature.h>
26 #include <SketchPlugin_Line.h>
27 #include <SketchPlugin_Arc.h>
28 #include <SketchPlugin_Circle.h>
30 #include <XGUI_Workshop.h>
31 #include <XGUI_ModuleConnector.h>
32 #include <XGUI_OperationMgr.h>
33 #include <XGUI_PropertyPanel.h>
34 #include <XGUI_ErrorMgr.h>
36 #include <QToolButton>
38 PartSet_SketcherReetntrantMgr::PartSet_SketcherReetntrantMgr(ModuleBase_IWorkshop* theWorkshop)
39 : QObject(theWorkshop),
40 myWorkshop(theWorkshop),
41 myRestartingMode(RM_None),
42 myIsFlagsBlocked(false),
43 myIsInternalEditOperation(false),
44 myNoMoreWidgetsAttribute("")
48 PartSet_SketcherReetntrantMgr::~PartSet_SketcherReetntrantMgr()
52 ModuleBase_ModelWidget* PartSet_SketcherReetntrantMgr::internalActiveWidget() const
54 ModuleBase_ModelWidget* aWidget = 0;
58 ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
60 ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
61 ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
62 if (myIsInternalEditOperation && (!anActiveWidget || !anActiveWidget->isViewerSelector()))
63 aWidget = myInternalActiveWidget;
68 bool PartSet_SketcherReetntrantMgr::isInternalEditActive() const
70 return myIsInternalEditOperation;
73 void PartSet_SketcherReetntrantMgr::updateInternalEditActiveState()
75 if (myIsInternalEditOperation) {
76 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
77 (myWorkshop->currentOperation());
79 FeaturePtr aFeature = aFOperation->feature();
80 QString anError = myWorkshop->module()->getFeatureError(aFeature);
81 // stop started internal edit operation as soon as the operation becomes invalid
82 // it is especially important for the sketch tangent arc feature
83 if (!anError.isEmpty()) {
84 aFOperation->setEditOperation(false);
85 //workshop()->operationMgr()->updateApplyOfOperations();
86 beforeStopInternalEdit();
87 myIsInternalEditOperation = false;
88 updateAcceptAllAction();
94 bool PartSet_SketcherReetntrantMgr::operationCommitted(ModuleBase_Operation* theOperation)
96 bool aProcessed = false;
100 aProcessed = myIsInternalEditOperation;
106 void PartSet_SketcherReetntrantMgr::operationStarted(ModuleBase_Operation* theOperation)
111 if (myPreviousFeature.get() && myRestartingMode == RM_LastFeatureUsed) {
112 ModuleBase_OperationFeature* aCurrentOperation = dynamic_cast<ModuleBase_OperationFeature*>(
113 myWorkshop->currentOperation());
114 CompositeFeaturePtr aSketch = module()->sketchMgr()->activeSketch();
115 copyReetntrantAttributes(myPreviousFeature, aCurrentOperation->feature(), aSketch);
120 void PartSet_SketcherReetntrantMgr::operationAborted(ModuleBase_Operation* theOperation)
128 bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow* /* theWnd*/,
129 QMouseEvent* /* theEvent*/)
131 bool aProcessed = false;
135 if (myIsInternalEditOperation) {
136 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
137 (myWorkshop->currentOperation());
138 FeaturePtr aLastFeature = myRestartingMode == RM_LastFeatureUsed ? aFOperation->feature()
141 ModuleBase_ModelWidget* anActiveWidget = module()->activeWidget();
142 ModuleBase_IPropertyPanel* aPanel = myWorkshop->currentOperation()->propertyPanel();
143 bool aWidgetIsFilled = false;
145 FeaturePtr aCurrentFeature = aFOperation->feature();
146 bool isLineFeature = false, isArcFeature = false;
147 if (aCurrentFeature->getKind() == SketchPlugin_Line::ID())
148 isLineFeature = anActiveWidget->attributeID() == SketchPlugin_Line::START_ID();
149 else if (isTangentArc(aFOperation))
150 isArcFeature = anActiveWidget->attributeID() == SketchPlugin_Arc::TANGENT_POINT_ID();
152 bool aCanBeActivatedByMove = isLineFeature || isArcFeature;
153 if (aCanBeActivatedByMove) {
154 myPreviousFeature = aFOperation->feature();
156 myPreviousFeature = FeaturePtr();
158 anActiveWidget = module()->activeWidget();
159 aCurrentFeature = anActiveWidget->feature();
161 if (isLineFeature || isArcFeature)
162 aWidgetIsFilled = true;
165 aPanel->activateNextWidget(anActiveWidget);
171 bool PartSet_SketcherReetntrantMgr::processMousePressed(ModuleBase_IViewWindow* /* theWnd*/,
172 QMouseEvent* /* theEvent*/)
174 return isActiveMgr() && myIsInternalEditOperation;
177 bool PartSet_SketcherReetntrantMgr::processMouseReleased(ModuleBase_IViewWindow* theWnd,
178 QMouseEvent* theEvent)
180 bool aProcessed = false;
184 if (myIsInternalEditOperation) {
185 ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
186 ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
188 ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
189 if (!anActiveWidget || !anActiveWidget->isViewerSelector()) {
191 // block of viewer update
192 // we need to block update content of the viewer because of Sketch Point feature
193 // in activate() the value of the point is initialized and it can be displayed
194 // but the default value is [0, 0]. So, we block update viewer contentent until
195 // onMouseRelease happens, which correct the point position
196 ModuleBase_Tools::blockUpdateViewer(true);
198 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
199 (myWorkshop->currentOperation());
200 myPreviousFeature = aFOperation->feature();
202 myPreviousFeature = FeaturePtr();
205 // fill the first widget by the mouse event point
206 // if the active widget is not the first, it means that the restarted operation is filled by
207 // the current preselection.
208 PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
209 ModuleBase_ModelWidget* aFirstWidget = aPanel->findFirstAcceptingValueWidget();
210 if (aPoint2DWdg && aPoint2DWdg == aFirstWidget) {
211 aPoint2DWdg->mouseReleased(theWnd, theEvent);
213 // unblock viewer update
214 ModuleBase_Tools::blockUpdateViewer(false);
221 void PartSet_SketcherReetntrantMgr::onWidgetActivated()
225 if (!myIsInternalEditOperation)
228 PartSet_Module* aModule = module();
229 ModuleBase_ModelWidget* aFirstWidget = aModule->activeWidget();
230 ModuleBase_IPropertyPanel* aPanel = aModule->currentOperation()->propertyPanel();
231 if (aFirstWidget != aPanel->activeWidget()) {
232 ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aFirstWidget);
234 aWSelector->activateSelectionAndFilters(true);
238 void PartSet_SketcherReetntrantMgr::onNoMoreWidgets(const std::string& thePreviousAttributeID)
243 // we should avoid processing of the signal about no more widgets attributes and
244 // do this after the restart operaion is finished if it was called
245 // onNoMoreWidgets depends on myIsFlagsBlocked and fill myNoMoreWidgetsAttribute
246 // if it should be called after restart
247 if (myIsFlagsBlocked) {
248 myNoMoreWidgetsAttribute = thePreviousAttributeID;
252 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
253 (myWorkshop->currentOperation());
254 if (!myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty())
257 if (aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) {
258 bool isStarted = false;
259 if (!module()->sketchMgr()->sketchSolverError()) {
260 if (myRestartingMode != RM_Forbided) {
261 myRestartingMode = RM_LastFeatureUsed;
262 isStarted = startInternalEdit(thePreviousAttributeID);
266 aFOperation->commit();
270 bool PartSet_SketcherReetntrantMgr::processEnter(const std::string& thePreviousAttributeID)
277 // empty previous attribute means that the Apply/Ok button has focus and the enter
278 // should not lead to start edition mode of the previous operation
279 if (thePreviousAttributeID.empty())
282 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
283 (myWorkshop->currentOperation());
284 if (!myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty())
287 bool isSketchSolverError = module()->sketchMgr()->sketchSolverError();
289 if (!isSketchSolverError) {
290 myRestartingMode = RM_EmptyFeatureUsed;
291 isDone = startInternalEdit(thePreviousAttributeID);
297 void PartSet_SketcherReetntrantMgr::onVertexSelected()
302 ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
303 std::string anOperationId = anOperation->id().toStdString();
304 if (anOperationId == SketchPlugin_Line::ID() || isTangentArc(anOperation)) {
305 /// If last line finished on vertex the lines creation sequence has to be break
306 ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
307 ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
308 const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
309 QList<ModuleBase_ModelWidget*>::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end();
310 bool aFoundWidget = false;
311 bool aFoundObligatory = false;
312 for (; anIt != aLast && !aFoundObligatory; anIt++) {
314 aFoundWidget = *anIt == anActiveWidget;
316 aFoundObligatory = (*anIt)->isObligatory();
318 if (!aFoundObligatory)
319 myRestartingMode = RM_Forbided;
323 void PartSet_SketcherReetntrantMgr::onBeforeStopped()
325 if (!isActiveMgr() || !myIsInternalEditOperation)
328 beforeStopInternalEdit();
331 bool PartSet_SketcherReetntrantMgr::canBeCommittedByPreselection()
333 return !isActiveMgr() || myRestartingMode == RM_None;
336 bool PartSet_SketcherReetntrantMgr::isInternalEditStarted() const
338 return myIsInternalEditOperation;
341 bool PartSet_SketcherReetntrantMgr::isActiveMgr() const
343 ModuleBase_Operation* aCurrentOperation = myWorkshop->currentOperation();
345 bool anActive = PartSet_SketcherMgr::isSketchOperation(aCurrentOperation);
347 anActive = PartSet_SketcherMgr::isNestedSketchOperation(aCurrentOperation);
348 if (anActive) { // the manager is not active when the current operation is a usual Edit
349 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
350 (myWorkshop->currentOperation());
351 if (aFOperation->isEditOperation())
352 anActive = myIsInternalEditOperation;
358 bool PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePreviousAttributeID)
361 /// this is workaround for ModuleBase_WidgetEditor, used in SALOME mode. Sometimes key enter
362 /// event comes two times, so we should not start another internal edit operation
363 /// the Apply button becomes disabled becase the second additional internal feature is created
364 if (myIsInternalEditOperation)
367 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
368 (myWorkshop->currentOperation());
370 if (aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) {
371 aFOperation->setEditOperation(true/*, false*/);
372 createInternalFeature();
374 myIsInternalEditOperation = true;
375 updateAcceptAllAction();
378 connect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
379 connect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
381 // activate selection filters of the first widget in the viewer
384 // activate the last active widget in the Property Panel
385 if (!thePreviousAttributeID.empty()) {
386 ModuleBase_Operation* anEditOperation = module()->currentOperation();
387 if (anEditOperation) {
388 ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
389 ModuleBase_ModelWidget* aPreviousAttributeWidget = 0;
390 QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
391 for (int i = 0, aNb = aWidgets.size(); i < aNb && !aPreviousAttributeWidget; i++) {
392 if (aWidgets[i]->attributeID() == thePreviousAttributeID) {
393 /// workaround for the same attributes used in different stacked widgets(attribute types)
394 if (ModuleBase_ToolBox::isOffToolBoxParent(aWidgets[i]))
396 aPreviousAttributeWidget = aWidgets[i];
399 // If the current widget is a selector, do nothing, it processes the mouse press
400 if (aPreviousAttributeWidget) {
401 if (!aPreviousAttributeWidget->isViewerSelector()) {
402 aPreviousAttributeWidget->focusTo();
403 aPreviousAttributeWidget->selectContent();
406 // in case of shape multi selector, the widget does not lose focus by filling
407 // like it is in shape selector. So, if enter is pressed, the multi shape selector
408 // control should be deactivated. The focus is moved to Apply button and there
409 // should not be active control visualized in property panel
410 if (aPreviousAttributeWidget == aPanel->activeWidget()) {
411 aPanel->activateWidget(NULL, false);
413 // if there is no the next widget to be automatically activated, the Ok button in property
414 // panel should accept the focus(example is parallel constraint on sketch lines)
415 QToolButton* anOkBtn = dynamic_cast<XGUI_PropertyPanel*>(aPanel)->findButton(PROP_PANEL_OK);
417 anOkBtn->setFocus(Qt::TabFocusReason);
424 module()->sketchMgr()->clearClickedFlags();
429 void PartSet_SketcherReetntrantMgr::beforeStopInternalEdit()
431 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
432 (myWorkshop->currentOperation());
434 disconnect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
435 disconnect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
438 deleteInternalFeature();
441 void PartSet_SketcherReetntrantMgr::restartOperation()
443 if (myIsInternalEditOperation) {
444 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(
445 myWorkshop->currentOperation());
447 myNoMoreWidgetsAttribute = "";
448 myIsFlagsBlocked = true;
449 FeaturePtr aPrevFeature = aFOperation->feature();
450 aFOperation->commit();
451 module()->launchOperation(aFOperation->id());
452 myIsFlagsBlocked = false;
454 // we should avoid processing of the signal about no more widgets attributes and
455 // do this after the restart operaion is finished if it was called
456 // onNoMoreWidgets depends on myIsFlagsBlocked and fill myNoMoreWidgetsAttribute
457 // if it should be called after restart
458 if (!myNoMoreWidgetsAttribute.empty()) {
459 onNoMoreWidgets(myNoMoreWidgetsAttribute);
460 myNoMoreWidgetsAttribute = "";
466 void PartSet_SketcherReetntrantMgr::createInternalFeature()
468 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
469 (myWorkshop->currentOperation());
471 if (aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) {
472 FeaturePtr anOperationFeature = aFOperation->feature();
474 CompositeFeaturePtr aSketch = module()->sketchMgr()->activeSketch();
475 myInternalFeature = aSketch->addFeature(anOperationFeature->getKind());
477 bool isFeatureChanged = copyReetntrantAttributes(anOperationFeature, myInternalFeature,
479 XGUI_PropertyPanel* aPropertyPanel = dynamic_cast<XGUI_PropertyPanel*>
480 (aFOperation->propertyPanel());
482 myInternalWidget = new QWidget(aPropertyPanel->contentWidget()->pageWidget());
483 myInternalWidget->setVisible(false);
485 ModuleBase_PageWidget* anInternalPage = new ModuleBase_PageWidget(myInternalWidget);
487 QString aXmlRepr = aFOperation->getDescription()->xmlRepresentation();
488 ModuleBase_WidgetFactory aFactory(aXmlRepr.toStdString(), myWorkshop);
490 aFactory.createWidget(anInternalPage);
491 QList<ModuleBase_ModelWidget*> aWidgets = aFactory.getModelWidgets();
493 foreach (ModuleBase_ModelWidget* aWidget, aWidgets) {
494 bool isStoreValue = !aFOperation->isEditOperation() &&
495 !aWidget->getDefaultValue().empty() &&
496 !aWidget->isComputedDefault();
497 aWidget->setFeature(myInternalFeature, isStoreValue);
498 if (!isStoreValue && isFeatureChanged)
499 aWidget->restoreValue();
502 ModuleBase_ModelWidget* aFirstWidget = ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget
505 myInternalActiveWidget = aFirstWidget;
509 void PartSet_SketcherReetntrantMgr::deleteInternalFeature()
511 if (myInternalActiveWidget) {
512 ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(myInternalActiveWidget);
514 aWSelector->activateSelectionAndFilters(false);
515 myInternalActiveWidget = 0;
517 delete myInternalWidget;
518 myInternalWidget = 0;
520 QObjectPtrList anObjects;
521 anObjects.append(myInternalFeature);
522 workshop()->deleteFeatures(anObjects);
523 myInternalFeature = FeaturePtr();
526 void PartSet_SketcherReetntrantMgr::resetFlags()
528 if (!myIsFlagsBlocked) {
529 myIsInternalEditOperation = false;
530 updateAcceptAllAction();
531 myRestartingMode = RM_None;
535 bool PartSet_SketcherReetntrantMgr::copyReetntrantAttributes(const FeaturePtr& theSourceFeature,
536 const FeaturePtr& theNewFeature,
537 const CompositeFeaturePtr& theSketch,
538 const bool isTemporary)
540 bool aChanged = false;
541 if (!theSourceFeature.get())
544 std::string aFeatureKind = theSourceFeature->getKind();
545 if (aFeatureKind == SketchPlugin_Line::ID()) {
546 // Initialize new line with first point equal to end of previous
547 std::shared_ptr<ModelAPI_Data> aSFData = theSourceFeature->data();
548 std::shared_ptr<GeomDataAPI_Point2D> aSPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
549 aSFData->attribute(SketchPlugin_Line::END_ID()));
550 std::shared_ptr<ModelAPI_Data> aNFData = theNewFeature->data();
551 std::shared_ptr<GeomDataAPI_Point2D> aNPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
552 aNFData->attribute(SketchPlugin_Line::START_ID()));
553 aNPoint->setValue(aSPoint->x(), aSPoint->y());
554 PartSet_Tools::createConstraint(theSketch, aSPoint, aNPoint);
556 aNPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
557 aSFData->attribute(SketchPlugin_Line::END_ID()));
558 aNPoint->setValue(aSPoint->x(), aSPoint->y());
560 else if (aFeatureKind == SketchPlugin_Circle::ID()) {
562 std::string aTypeAttributeId = SketchPlugin_Circle::CIRCLE_TYPE();
563 AttributeStringPtr aSourceFeatureTypeAttr = theSourceFeature->data()->string(aTypeAttributeId);
564 AttributeStringPtr aNewFeatureTypeAttr = theNewFeature->data()->string(aTypeAttributeId);
565 aNewFeatureTypeAttr->setValue(aSourceFeatureTypeAttr->value());
566 //ModuleBase_Tools::flushUpdated(theNewFeature);
569 else if (aFeatureKind == SketchPlugin_Arc::ID()) {
571 std::string aTypeAttributeId = SketchPlugin_Arc::ARC_TYPE();
572 AttributeStringPtr aSourceFeatureTypeAttr = theSourceFeature->data()->string(aTypeAttributeId);
573 AttributeStringPtr aNewFeatureTypeAttr = theNewFeature->data()->string(aTypeAttributeId);
574 aNewFeatureTypeAttr->setValue(aSourceFeatureTypeAttr->value());
576 // if the arc is tangent, set coincidence to end point of the previous arc
577 std::string anArcType = aSourceFeatureTypeAttr->value();
578 if (anArcType == SketchPlugin_Arc::ARC_TYPE_TANGENT()) {
579 // get the last point of the previuos arc feature(geom point 2d)
580 std::shared_ptr<ModelAPI_Data> aSData = theSourceFeature->data();
581 std::shared_ptr<GeomDataAPI_Point2D> aSPointAttr =
582 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
583 aSData->attribute(SketchPlugin_Arc::END_ID()));
584 // get point attribute on the current feature
585 AttributeRefAttrPtr aTangentPointAttr = theNewFeature->data()->refattr(
586 SketchPlugin_Arc::TANGENT_POINT_ID());
587 aTangentPointAttr->setAttr(aSPointAttr);
589 std::shared_ptr<GeomDataAPI_Point2D> aNPointAttr =
590 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
591 theNewFeature->data()->attribute(SketchPlugin_Arc::END_ID()));
592 aNPointAttr->setValue(aSPointAttr->x(), aSPointAttr->y());
595 //ModuleBase_Tools::flushUpdated(theNewFeature);
601 bool PartSet_SketcherReetntrantMgr::isTangentArc(ModuleBase_Operation* theOperation)
603 bool aTangentArc = false;
604 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
606 if (aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) {
607 FeaturePtr aFeature = aFOperation->feature();
608 if (aFeature.get() && aFeature->getKind() == SketchPlugin_Arc::ID()) {
609 AttributeStringPtr aTypeAttr = aFeature->data()->string(SketchPlugin_Arc::ARC_TYPE());
610 std::string anArcType = aTypeAttr.get() ? aTypeAttr->value() : "";
611 aTangentArc = anArcType == SketchPlugin_Arc::ARC_TYPE_TANGENT();
617 void PartSet_SketcherReetntrantMgr::updateAcceptAllAction()
619 CompositeFeaturePtr aSketch = module()->sketchMgr()->activeSketch();
621 workshop()->errorMgr()->updateAcceptAllAction(aSketch);
624 XGUI_Workshop* PartSet_SketcherReetntrantMgr::workshop() const
626 XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myWorkshop);
627 return aConnector->workshop();
630 PartSet_Module* PartSet_SketcherReetntrantMgr::module() const
632 return dynamic_cast<PartSet_Module*>(myWorkshop->module());