#include "PartSet_WidgetPoint2DFlyout.h"
#include "PartSet_WidgetShapeSelector.h"
#include "PartSet_WidgetMultiSelector.h"
+#include "PartSet_WidgetSubShapeSelector.h"
#include "PartSet_WidgetEditor.h"
#include "PartSet_WidgetFileSelector.h"
#include "PartSet_WidgetSketchCreator.h"
void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
{
- if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
+ if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation, sketchMgr()->activeSketch())) {
mySketchMgr->commitNestedSketch(theOperation);
}
if (PartSet_SketcherMgr::isSketchOperation(theOperation)) {
mySketchMgr->startSketch(theOperation);
}
- else if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
+ else if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation,
+ sketchMgr()->activeSketch())) {
mySketchMgr->startNestedSketch(theOperation);
}
}
bool isModifiedResults = myCustomPrs->deactivate(ModuleBase_IModule::CustomizeResults, false);
bool isModified = isModifiedArgs || isModifiedResults;
- if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
+ if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation, sketchMgr()->activeSketch())) {
mySketchMgr->stopNestedSketch(theOperation);
}
else if (PartSet_SketcherMgr::isSketchOperation(theOperation))
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation),
- isNestedOp = PartSet_SketcherMgr::isNestedSketchOperation(anOperation);
+ isNestedOp = PartSet_SketcherMgr::isNestedSketchOperation(anOperation,
+ sketchMgr()->activeSketch());
if (isSketchOp || isNestedOp) {
// in active sketch operation it is possible to activate operation object in selection
// in the edit operation, e.g. points of the line can be moved when the line is edited
aShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
aWgt = aShapeSelectorWgt;
}
+ else if (theType == "sketch_sub_shape_selector") {
+ PartSet_WidgetSubShapeSelector* aSubShapeSelectorWgt =
+ new PartSet_WidgetSubShapeSelector(theParent, aWorkshop, theWidgetApi);
+ aSubShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
+ aWgt = aSubShapeSelectorWgt;
+ }
else if (theType == WDG_DOUBLEVALUE_EDITOR) {
aWgt = new PartSet_WidgetEditor(theParent, aWorkshop, theWidgetApi);
} else if (theType == "export_file_selector") {
// 1. check whether the delete should be processed in the module
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation),
- isNestedOp = PartSet_SketcherMgr::isNestedSketchOperation(anOperation);
+ isNestedOp = PartSet_SketcherMgr::isNestedSketchOperation(anOperation,
+ sketchMgr()->activeSketch());
if (isSketchOp || isNestedOp) {
isProcessed = true;
// 2. find selected presentations
GeomShapePtr aGeomShape;
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
- if (anOperation && PartSet_SketcherMgr::isNestedSketchOperation(anOperation)) {
+ if (anOperation && PartSet_SketcherMgr::isNestedSketchOperation(anOperation,
+ sketchMgr()->activeSketch())) {
aGeomShape = PartSet_Tools::findShapeBy2DPoint(theAttribute, myWorkshop);
}
return aGeomShape;