+/*
+ * Disables all actions which have the Document Kind different to
+ * the current document's kind
+ */
+void XGUI_ActionsMgr::updateByDocumentKind()
+{
+ std::string aStdDocKind = ModelAPI_Session::get()->activeDocument()->kind();
+ QString aDocKind = QString::fromStdString(aStdDocKind);
+ foreach(QAction* eachAction, myActions.values()) {
+ XGUI_Command* aCmd = dynamic_cast<XGUI_Command*>(eachAction);
+ if(aCmd) {
+ QString aCmdDocKind = aCmd->documentKind();
+ if(!aCmdDocKind.isEmpty() && aCmdDocKind != aDocKind) {
+ eachAction->setEnabled(false);
+ }
+ }
+ }
+}