- ModuleBase_Operation* aOperation = getCurrentOperation();
- ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
- ModuleBase_ModelWidget* anActiveWdg = aPanel ? aPanel->activeWidget() : 0;
- // the active widget editor should not influence here. The presentation should be visible always
- // when this widget is active.
- if (anActiveWdg) {
- ModuleBase_WidgetEditor* anEditorWdg = dynamic_cast<ModuleBase_WidgetEditor*>(anActiveWdg);
- if (anEditorWdg) {
- return aCanDisplay;
- }
- }
- if (myIsPopupMenuActive)
- return aCanDisplay;
-
- // during a nested create operation, the feature is redisplayed only if the mouse over view
- // of there was a value modified in the property panel after the mouse left the view
- aCanDisplay = myIsPropertyPanelValueChanged || myIsMouseOverWindow;
- return aCanDisplay;
-}
-
-bool PartSet_SketcherMgr::canSetAuxiliary(bool& theValue) const
-{
- bool anEnabled = false;
- ModuleBase_Operation* anOperation = getCurrentOperation();
-
- bool isActiveSketch = PartSet_SketcherMgr::isSketchOperation(anOperation) ||
- PartSet_SketcherMgr::isNestedSketchOperation(anOperation);
- if (!isActiveSketch)
- return anEnabled;
-
- QObjectPtrList anObjects;
- // 1. change auxiliary type of a created feature
- if (PartSet_SketcherMgr::isNestedCreateOperation(anOperation) &&
- PartSet_SketcherMgr::isEntityOperation(anOperation) ) {
- anObjects.append(anOperation->feature());
- }
- else {
- if (PartSet_SketcherMgr::isNestedSketchOperation(anOperation))
- anOperation->abort();
- // 2. change auxiliary type of selected sketch entities
- ModuleBase_ISelection* aSelection = myModule->workshop()->selection();
- anObjects = aSelection->selectedPresentations();
+ bool aHasActiveSketch = activeSketch().get() != NULL;
+ if (aHasActiveSketch) {
+ // 1. the sketch feature should not be displayed during the sketch active operation
+ // it is hidden by a sketch operation start and shown by a sketch stop, just the sketch
+ // nested features can be visualized
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
+ if (aFeature.get() != NULL && aFeature == activeSketch())
+ aCanDisplay = false;