if (QString((*aIt).c_str()) == MOVE_TO_END_COMMAND)
myObjectBrowser->rebuildDataTree();
}
+ facesPanel()->reset(true);
operationMgr()->updateApplyOfOperations();
updateCommandStatus();
myObjectBrowser->rebuildDataTree();
}
operationMgr()->updateApplyOfOperations();
+ facesPanel()->reset(true);
updateCommandStatus();
// unblock the viewer update functionality and make update on purpose
//******************************************************
void XGUI_Workshop::updateHistory()
{
- std::list<std::string> aUndoList = ModelAPI_Session::get()->undoList();
- QList<ActionInfo> aUndoRes = processHistoryList(aUndoList);
- emit updateUndoHistory(aUndoRes);
+ bool isActionEnabled = false;
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ QList<ActionInfo> aUndoRes;
+ QList<ActionInfo> aRedoRes;
+ if (anActiveWidget && anActiveWidget->canProcessAction(ActionUndo, isActionEnabled)) {
+ aUndoRes = anActiveWidget->actionsList(ActionUndo);
+ aRedoRes = anActiveWidget->actionsList(ActionRedo);
+ } else {
+ std::list<std::string> aUndoList = ModelAPI_Session::get()->undoList();
+ aUndoRes = processHistoryList(aUndoList);
- std::list<std::string> aRedoList = ModelAPI_Session::get()->redoList();
- QList<ActionInfo> aRedoRes = processHistoryList(aRedoList);
+ std::list<std::string> aRedoList = ModelAPI_Session::get()->redoList();
+ aRedoRes = processHistoryList(aRedoList);
+ }
+ emit updateUndoHistory(aUndoRes);
emit updateRedoHistory(aRedoRes);
}
viewer()->eraseAll();
#endif
updateCommandStatus();
-#ifndef WIN32
- // Necessary for update icons in ObjectBrowser on Linux
- myObjectBrowser->updateAllIndexes();
-#endif
+ // Necessary for update icons in ObjectBrowser on Linux
+ myObjectBrowser->updateAllIndexes();
} else if (theId == "SELECT_VERTEX_CMD") {
setViewerSelectionMode(TopAbs_VERTEX);
} else if (theId == "SELECT_EDGE_CMD") {
// find hidden objects in faces panel
std::set<ObjectPtr> aHiddenObjects;
QStringList aHiddenObjectNames;
- for (std::set<ObjectPtr>::const_iterator anObjectsIt = theObjects.begin();
- anObjectsIt != theObjects.end(); anObjectsIt++) {
+ for (std::set<ObjectPtr>::const_iterator anObjectsIt = anAllProcessedObjects.begin();
+ anObjectsIt != anAllProcessedObjects.end(); anObjectsIt++) {
if (!facesPanel()->isObjectHiddenByPanel(*anObjectsIt))
continue;
aHiddenObjects.insert(*anObjectsIt);
int anAnswer = QMessageBox::question(
desktop(), tr("Show object"),
tr("'%1'\n are hidden by %2:\nRemove objects from the panel to be displayed?")
- .arg(aHiddenObjectNames.join(',').arg(facesPanel()->windowTitle()),
+ .arg(aHiddenObjectNames.join(',')).arg(facesPanel()->windowTitle(),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No));
bool aToBeDisplayed = anAnswer == QMessageBox::Yes;
aObj->setDisplayed(true);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
-#ifndef WIN32
+
// Necessary for update icons in ObjectBrowser on Linux
- QModelIndexList aIndexes = mySelector->selection()->selectedIndexes();
- foreach (QModelIndex aIdx, aIndexes) {
- if (aIdx.column() == 0) {
- myObjectBrowser->treeView()->update(aIdx);
- }
- }
-#endif
+ myObjectBrowser->updateAllIndexes();
}
//**************************************************************