boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(myFeatureAttributeID));
+ bool isBlocked = this->blockSignals(true);
aPoint->setValue(myXSpin->value(), myYSpin->value());
+ this->blockSignals(isBlocked);
return true;
}
}
}
+void XGUI_ActionsMgr::updateAction(const QString& theId)
+{
+ if(myActions.contains(theId)){
+ myActions[theId]->setEnabled(myActionsState[theId]);
+ myActions[theId]->setChecked(false);
+ }
+}
+
void XGUI_ActionsMgr::setNestedActionsEnabled(bool isEnabled)
{
foreach(QString eachKey, myNestedActions) {
void saveCommandsState();
void restoreCommandState();
+ void updateAction(const QString&);
void setNestedActionsEnabled(bool);
public slots:
return (myOperations.count() > 0) && (myOperations.last() != NULL);
}
+int XGUI_OperationMgr::operationsCount() const
+{
+ return myOperations.count();
+}
+
bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
{
if (!canStartOperation(theOperation))
ModuleBase_Operation* currentOperation() const;
/// Returns true is operation manager has at least one non-null operation.
bool hasOperation() const;
+ /// Returns number of operations in the stack
+ int operationsCount() const;
/// Start the operation and append it to the stack of operations
/// \param theOperation the started operation
/// \return the state whether the current operation is started
{
ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
- if(aOperation->getDescription()->xmlRepresentation().isEmpty()) { //!< No need for property panel
- updateCommandStatus();
- } else {
- hidePropertyPanel();
- updateCommandStatus();
+ //!< No need for property panel
+ updateCommandStatus();
+ hidePropertyPanel();
+ if(myOperationMgr->operationsCount() > 1) {
+ myActionsMgr->updateAction(theOperation->getDescription()->operationId());
+ return;
+ }
+ if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) {
myActionsMgr->restoreCommandState();
}
}