#ifndef HAVE_SALOME
connect(myMainWindow, SIGNAL(exitKeySequence()), SLOT(onExit()));
- onTrihedronVisibilityChanged(true);
+ myDisplayer->displayTrihedron(true);
#endif
connect(myEventsListener, SIGNAL(errorOccurred(std::shared_ptr<Events_InfoMessage>)),
void XGUI_Workshop::onTrihedronVisibilityChanged(bool theState)
{
XGUI_Displayer* aDisplayer = displayer();
- if (aDisplayer)
+ if (aDisplayer) {
aDisplayer->displayTrihedron(theState);
+ aDisplayer->updateViewer();
+ }
}
//******************************************************
void XGUI_Workshop::onWidgetObjectUpdated()
{
operationMgr()->onValidateOperation();
+ myDisplayer->updateViewer();
}
//******************************************************
if (!(hasResult || hasFeature || hasParameter || hasFolder))
return;
- // Remove from the list non-deletable objects: infinite constuctions which are not in history
+ // Remove from the list non-deletable objects: infinite constructions which are not in history
bool notDelete = true;
QObjectPtrList::iterator aIt;
for (aIt = anObjects.begin(); aIt != anObjects.end(); aIt++) {
ObjectPtr aObj = (*aIt);
ResultConstructionPtr aConstr = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
- notDelete = (!aFeature->isInHistory()) && aConstr->isInfinite();
- if (notDelete) {
- anObjects.removeAll(aObj);
- aIt--;
+ if (aFeature) {
+ notDelete = (!aFeature->isInHistory()) && aConstr->isInfinite();
+ if (notDelete) {
+ anObjects.removeAll(aObj);
+ aIt--;
+ }
}
}
// delete objects
operationMgr()->commitOperation();
else
operationMgr()->abortOperation(operationMgr()->currentOperation());
+
+ myDisplayer->updateViewer();
}
//**************************************************************
SessionPtr aMgr = ModelAPI_Session::get();
- QString anActionId = "MOVE_CMD";
- QString aDescription = contextMenuMgr()->action(anActionId)->text();
- aMgr->startOperation(aDescription.toStdString());
-
QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
// It is necessary to clear selection in order to avoid selection changed event during
// moving and negative consequences connected with processing of already moved items
if (!XGUI_Tools::canRemoveOrRename(desktop(), aFeatures))
return;
+ QString anActionId = "MOVE_CMD";
+ QString aDescription = contextMenuMgr()->action(anActionId)->text();
+ aMgr->startOperation(aDescription.toStdString());
+
// Sort features by index in document
std::list<FeaturePtr> aFList(aFeatures.begin(), aFeatures.end());
aFList.sort(compareFeature);
aCurrentFeature = anActiveDocument->currentFeature(true);
}
aMgr->finishOperation();
+ updateCommandStatus();
}
//**************************************************************