<feature id="Extrusion" title="Extrusion" tooltip="Create a solid by extrusion of a face" icon=":icons/extrusion.png">
<source path="extrusion_widget.xml"/>
</feature>
- <feature id="ExtrusionSketch" title="ExtrusionSketch" tooltip="Create a solids by extrusion of a sketch" icon=":icons/extrusionsketch.png">
+ <!--<feature id="ExtrusionSketch" title="ExtrusionSketch" tooltip="Create a solids by extrusion of a sketch" icon=":icons/extrusionsketch.png">
<source path="extrusionsketch_widget.xml"/>
- </feature>
+ </feature>-->
<feature id="ExtrusionCut" title="ExtrusionCut" tooltip="" icon=":icons/extrusion_cut.png">
<source path="extrusioncut_widget.xml"/>
</feature>
<feature id="Revolution" title="Revolution" tooltip="Create a solid by revolution of a face" icon=":icons/revol.png">
<source path="revolution_widget.xml"/>
</feature>
- <feature id="RevolutionSketch" title="RevolutionSketch" tooltip="Create a solids by revolution of a sketch" icon=":icons/revolsketch.png">
+ <!--<feature id="RevolutionSketch" title="RevolutionSketch" tooltip="Create a solids by revolution of a sketch" icon=":icons/revolsketch.png">
<source path="revolutionsketch_widget.xml"/>
- </feature>
+ </feature>-->
<feature id="RevolutionCut" title="RevolutionCut" tooltip="" icon=":icons/revol_cut.png">
<source path="revolutioncut_widget.xml"/>
</feature>
</composite_multi_selector>
<toolbox id="CreationMethod">
<box id="ByAngles" title="By angles" icon=":icons/angle_up_down_32x32.png">
- <multi_selector id="base"
- label="Select a sketch face"
- icon=":icons/sketch.png"
- tooltip="Select a sketch face"
- type_choice="Faces">
- <validator id="GeomValidators_FeatureKind" parameters="Sketch"/>
- </multi_selector>
<shape_selector id="axis_object"
icon=":icons/axis.png"
label="Axis"
</groupbox>
</box>
<box id="ByPlanesAndOffsets" title="By bounding planes and angles" icon=":icons/plane_inverted_32x32.png">
- <multi_selector id="base"
- label="Select a sketch face"
- icon=":icons/sketch.png"
- tooltip="Select a sketch face"
- type_choice="Faces">
- <validator id="GeomValidators_FeatureKind" parameters="Sketch"/>
- </multi_selector>
<shape_selector id="axis_object"
icon=":icons/axis.png"
label="Axis"
if (!aIsOp)
aMgr->startOperation();
aPCompositeFeature->execute(); // to fill attribute selection list
- if (!aIsOp)
- aMgr->finishOperation();
std::list<AttributePtr> aSelListAttributes = aParentFeature->data()->attributes(
ModelAPI_AttributeSelectionList::typeId());
aCanCommit = false;
}
}
+ if (!aIsOp) {
+ if (aCanCommit)
+ aMgr->finishOperation();
+ else
+ aMgr->abortOperation();
+ }
}
}
return aCanCommit;
// do nothing, selection control should be shown
activateSelectionControl();
- return;
- }
- // do nothing, selection control should be hidden
- setVisibleSelectionControl(false);
- // Update value in attribute selection list
- XGUI_PropertyPanel* aPanel = aWorkshop->propertyPanel();
- const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
- foreach(ModuleBase_ModelWidget* aWidget, aWidgets) {
- if (aWidget->attributeID() == myAttributeListID)
- aWidget->restoreValue();
- }
-
- // Hide sketcher result
- CompositeFeaturePtr aSketchFeature =
- std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCompFeature->subFeature(0));
- std::list<ResultPtr> aResults = aSketchFeature->results();
- std::list<ResultPtr>::const_iterator aIt;
- for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
- (*aIt)->setDisplayed(false);
}
- aSketchFeature->setDisplayed(false);
-
- // restore value in the selection control
-
+ else {
+ setVisibleSelectionControl(false);
+ // Update value in attribute selection list
+ XGUI_PropertyPanel* aPanel = aWorkshop->propertyPanel();
+ const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
+ foreach(ModuleBase_ModelWidget* aWidget, aWidgets) {
+ if (aWidget->attributeID() == myAttributeListID)
+ aWidget->restoreValue();
+ }
- // Add Selected body were created the sketcher to list of selected objects
- std::string anObjectsAttribute = FeaturesPlugin_CompositeBoolean::BOOLEAN_OBJECTS_ID();
- AttributeSelectionListPtr aSelList = aCompFeature->data()->selectionList(anObjectsAttribute);
- if (aSelList.get()) {
- DataPtr aData = aSketchFeature->data();
- AttributeSelectionPtr aSelAttr = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
- (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
- ResultPtr aRes = aSelAttr.get() ? aSelAttr->context() : ResultPtr();
- if (aRes.get()) {
- SessionPtr aMgr = ModelAPI_Session::get();
- ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
- AttributePtr anAttribute = myFeature->attribute(anObjectsAttribute);
- std::string aValidatorID, anError;
- aSelList->append(aRes, GeomShapePtr());
- if (aFactory->validate(anAttribute, aValidatorID, anError))
- updateObject(aCompFeature);
- else
- aSelList->clear();
+ // Hide sketcher result
+ CompositeFeaturePtr aSketchFeature =
+ std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCompFeature->subFeature(0));
+ std::list<ResultPtr> aResults = aSketchFeature->results();
+ std::list<ResultPtr>::const_iterator aIt;
+ for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
+ (*aIt)->setDisplayed(false);
+ }
+ aSketchFeature->setDisplayed(false);
+ static Events_Loop* aLoop = Events_Loop::loop();
+ aLoop->flush(aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY));
+
+ // Add Selected body were created the sketcher to list of selected objects
+ std::string anObjectsAttribute = FeaturesPlugin_CompositeBoolean::BOOLEAN_OBJECTS_ID();
+ AttributeSelectionListPtr aSelList = aCompFeature->data()->selectionList(anObjectsAttribute);
+ if (aSelList.get()) {
+ DataPtr aData = aSketchFeature->data();
+ AttributeSelectionPtr aSelAttr = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
+ (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
+ ResultPtr aRes = aSelAttr.get() ? aSelAttr->context() : ResultPtr();
+ if (aRes.get()) {
+ SessionPtr aMgr = ModelAPI_Session::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+ AttributePtr anAttribute = myFeature->attribute(anObjectsAttribute);
+ std::string aValidatorID, anError;
+ aSelList->append(aRes, GeomShapePtr());
+ if (aFactory->validate(anAttribute, aValidatorID, anError))
+ updateObject(aCompFeature);
+ else
+ aSelList->clear();
+ }
}
}
}