1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 #include "XGUI_ContextMenuMgr.h"
4 #include "XGUI_Workshop.h"
5 #include "XGUI_ObjectsBrowser.h"
6 #include "XGUI_SelectionMgr.h"
7 #include "XGUI_Displayer.h"
8 #include "XGUI_ViewerProxy.h"
9 #include "XGUI_Selection.h"
10 #include "XGUI_SalomeConnector.h"
11 #include "XGUI_DataModel.h"
12 #include "XGUI_OperationMgr.h"
13 #include "XGUI_Tools.h"
14 #include "XGUI_ActionsMgr.h"
17 #include <AppElements_MainWindow.h>
20 //#include "PartSetPlugin_Part.h"
22 #include <ModelAPI_Data.h>
23 #include <ModelAPI_AttributeDocRef.h>
24 #include <ModelAPI_Object.h>
25 #include <ModelAPI_Session.h>
26 #include <ModelAPI_ResultGroup.h>
27 #include <ModelAPI_ResultParameter.h>
28 #include <ModelAPI_ResultConstruction.h>
29 #include <ModelAPI_ResultBody.h>
30 #include <ModelAPI_Tools.h>
32 #include <Config_DataModelReader.h>
34 #include <ModuleBase_IModule.h>
35 #include <ModuleBase_Tools.h>
36 #include <ModuleBase_OperationAction.h>
37 #include <ModuleBase_ViewerPrs.h>
40 #include <QActionGroup>
41 #include <QContextMenuEvent>
44 #include <QMainWindow>
45 #include <QModelIndex>
48 XGUI_ContextMenuMgr::XGUI_ContextMenuMgr(XGUI_Workshop* theParent)
50 myWorkshop(theParent),
55 XGUI_ContextMenuMgr::~XGUI_ContextMenuMgr()
59 void XGUI_ContextMenuMgr::createActions()
62 QMainWindow* aDesktop = myWorkshop->salomeConnector()->desktop();
64 QMainWindow* aDesktop = myWorkshop->mainWindow();
67 QAction* aAction = new QAction(QIcon(":pictures/delete.png"), tr("Delete"), this);
68 aDesktop->addAction(aAction);
70 addAction("DELETE_CMD", aAction);
71 aAction->setShortcutContext(Qt::ApplicationShortcut);
73 aAction = new QAction(QIcon(":pictures/rename_edit.png"), tr("Rename"), this);
74 addAction("RENAME_CMD", aAction);
75 connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRename()));
77 aAction = new QAction(QIcon(":pictures/move.png"), XGUI_Workshop::MOVE_TO_END_COMMAND, this);
78 addAction("MOVE_CMD", aAction);
80 aAction = new QAction(QIcon(":pictures/clean_history.png"), tr("Clean history"), this);
81 addAction("CLEAN_HISTORY_CMD", aAction);
83 aAction = new QAction(QIcon(":pictures/color.png"), tr("Color..."), this);
84 addAction("COLOR_CMD", aAction);
86 aAction = new QAction(QIcon(":pictures/eye_pencil.png"), tr("Show"), this);
87 addAction("SHOW_CMD", aAction);
89 aAction = new QAction(QIcon(":pictures/eye_pencil.png"), tr("Show only"), this);
90 addAction("SHOW_ONLY_CMD", aAction);
92 aAction = new QAction(QIcon(":pictures/eye_pencil_closed.png"), tr("Hide"), this);
93 addAction("HIDE_CMD", aAction);
95 aAction = new QAction(QIcon(":pictures/eye_pencil_closed.png"), tr("Hide all"), this);
96 addAction("HIDEALL_CMD", aAction);
98 aAction = new QAction(QIcon(":pictures/shading.png"), tr("Shading"), this);
99 addAction("SHADING_CMD", aAction);
101 aAction = new QAction(QIcon(":pictures/wireframe.png"), tr("Wireframe"), this);
102 addAction("WIREFRAME_CMD", aAction);
104 mySeparator = new QAction(this);
105 mySeparator->setSeparator(true);
107 mySelectActions = new QActionGroup(this);
108 mySelectActions->setExclusive(true);
110 aAction = new QAction(QIcon(":pictures/vertex.png"), tr("Vertices"), this);
111 aAction->setCheckable(true);
112 addAction("SELECT_VERTEX_CMD", aAction);
113 mySelectActions->addAction(aAction);
115 aAction = new QAction(QIcon(":pictures/edge.png"), tr("Edges"), this);
116 aAction->setCheckable(true);
117 addAction("SELECT_EDGE_CMD", aAction);
118 mySelectActions->addAction(aAction);
120 aAction = new QAction(QIcon(":pictures/face.png"), tr("Faces"), this);
121 aAction->setCheckable(true);
122 addAction("SELECT_FACE_CMD", aAction);
123 mySelectActions->addAction(aAction);
125 aAction = new QAction(QIcon(":pictures/result.png"), tr("Result"), this);
126 aAction->setCheckable(true);
127 addAction("SELECT_RESULT_CMD", aAction);
128 mySelectActions->addAction(aAction);
130 aAction->setChecked(true);
132 aAction = new QAction(QIcon(":pictures/find_result.png"), tr("Select results"), this);
133 addAction("SHOW_RESULTS_CMD", aAction);
135 aAction = new QAction(QIcon(":pictures/find_result.png"), tr("Select parent feature"), this);
136 addAction("SHOW_FEATURE_CMD", aAction);
138 buildObjBrowserMenu();
142 void XGUI_ContextMenuMgr::addAction(const QString& theId, QAction* theAction)
144 if (myActions.contains(theId))
145 qCritical("A command with Id = '%s' already defined!", qPrintable(theId));
146 theAction->setData(theId);
147 connect(theAction, SIGNAL(triggered(bool)), this, SLOT(onAction(bool)));
148 myActions[theId] = theAction;
151 QAction* XGUI_ContextMenuMgr::action(const QString& theId) const
153 if (myActions.contains(theId))
154 return myActions[theId];
158 QAction* XGUI_ContextMenuMgr::actionByName(const QString& theName) const
160 foreach(QAction* eachAction, myActions) {
161 if (eachAction->text() == theName) {
168 QStringList XGUI_ContextMenuMgr::actionIds() const
170 return myActions.keys();
173 void XGUI_ContextMenuMgr::onAction(bool isChecked)
175 QAction* aAction = static_cast<QAction*>(sender());
176 emit actionTriggered(aAction->data().toString(), isChecked);
179 void XGUI_ContextMenuMgr::updateCommandsStatus()
183 void XGUI_ContextMenuMgr::onContextMenuRequest(QContextMenuEvent* theEvent)
185 QMenu* aMenu = new QMenu();
186 if (sender() == myWorkshop->objectBrowser()) {
187 updateObjectBrowserMenu();
188 addObjBrowserMenu(aMenu);
189 } else if (sender() == myWorkshop->viewer()) {
191 addViewerMenu(aMenu);
194 if (aMenu && (aMenu->actions().size() > 0)) {
195 // it is possible that some objects should do something before and after the popup menu exec
196 // e.g. a sketch manager changes an internal flag on this signals in order to do not hide
198 emit beforeContextMenu();
199 aMenu->exec(theEvent->globalPos());
200 emit afterContextMenu();
205 void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
207 foreach(QAction* aAction, myActions)
208 aAction->setEnabled(false);
210 XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
211 QObjectPtrList aObjects = aSelMgr->selection()->selectedObjects();
212 int aSelected = aObjects.size();
214 SessionPtr aMgr = ModelAPI_Session::get();
215 XGUI_Displayer* aDisplayer = myWorkshop->displayer();
216 bool hasResult = false;
217 bool hasFeature = false;
218 bool hasParameter = false;
219 bool hasCompositeOwner = false;
220 ModuleBase_Tools::checkObjects(aObjects, hasResult, hasFeature, hasParameter,
223 if (aSelected == 1) {
224 ObjectPtr aObject = aObjects.first();
226 if (hasResult && myWorkshop->canBeShaded(aObject)) {
227 XGUI_Displayer::DisplayMode aMode = aDisplayer->displayMode(aObject);
228 if (aMode != XGUI_Displayer::NoMode) {
229 action("WIREFRAME_CMD")->setEnabled(aMode == XGUI_Displayer::Shading);
230 action("SHADING_CMD")->setEnabled(aMode == XGUI_Displayer::Wireframe);
232 action("WIREFRAME_CMD")->setEnabled(true);
233 action("SHADING_CMD")->setEnabled(true);
237 bool aHasSubResults = ModelAPI_Tools::hasSubResults(
238 std::dynamic_pointer_cast<ModelAPI_Result>(aObject));
239 if (aHasSubResults) {
240 action("HIDE_CMD")->setEnabled(true);
241 action("SHOW_CMD")->setEnabled(true);
244 if (aObject->isDisplayed()) {
245 action("HIDE_CMD")->setEnabled(true);
246 } else if (hasResult && (!hasParameter)) {
247 action("SHOW_CMD")->setEnabled(true);
250 if (!(hasParameter || hasFeature))
251 action("SHOW_ONLY_CMD")->setEnabled(true);
253 else if (hasFeature && myWorkshop->canMoveFeature())
254 action("MOVE_CMD")->setEnabled(true);
256 if( aMgr->activeDocument() == aObject->document() )
258 action("RENAME_CMD")->setEnabled(true);
259 action("DELETE_CMD")->setEnabled(!hasCompositeOwner);
260 action("CLEAN_HISTORY_CMD")->setEnabled(!hasCompositeOwner &&
261 (hasFeature || hasParameter));
265 // parameter is commented because the actions are not in the list of result parameter actions
266 if (hasResult /*&& (!hasParameter)*/) {
267 action("SHOW_CMD")->setEnabled(true);
268 action("HIDE_CMD")->setEnabled(true);
269 action("SHOW_ONLY_CMD")->setEnabled(true);
270 action("SHADING_CMD")->setEnabled(true);
271 action("WIREFRAME_CMD")->setEnabled(true);
274 bool allActive = true;
275 foreach( ObjectPtr aObject, aObjects )
276 if( aMgr->activeDocument() != aObject->document() ) {
280 if (!hasCompositeOwner && allActive ) {
281 if (hasFeature || hasParameter)
282 action("DELETE_CMD")->setEnabled(true);
284 if (!hasCompositeOwner && allActive && (hasFeature|| hasParameter))
285 action("CLEAN_HISTORY_CMD")->setEnabled(true);
287 action("SHOW_RESULTS_CMD")->setEnabled(hasFeature);
288 action("SHOW_FEATURE_CMD")->setEnabled(hasResult);
291 // Show/Hide command has to be disabled for objects from non active document
292 bool aDeactivate = false;
293 foreach (ObjectPtr aObj, aObjects) {
294 if (!aObj->document()->isActive()) {
295 if ((aObj->document() != ModelAPI_Session::get()->moduleDocument()) ||
296 aObj->groupName() == ModelAPI_ResultPart::group()) {
303 // If at leas a one objec can not be edited then Show/Hide has to be disabled
304 action("SHOW_CMD")->setEnabled(false);
305 action("HIDE_CMD")->setEnabled(false);
306 action("SHOW_ONLY_CMD")->setEnabled(false);
309 if (myWorkshop->canChangeColor())
310 action("COLOR_CMD")->setEnabled(true);
312 ModuleBase_IModule* aModule = myWorkshop->module();
314 aModule->updateObjectBrowserMenu(myActions);
317 void XGUI_ContextMenuMgr::updateViewerMenu()
319 foreach(QAction* aAction, myActions)
320 aAction->setEnabled(false);
322 XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
323 XGUI_Displayer* aDisplayer = myWorkshop->displayer();
324 QList<ModuleBase_ViewerPrsPtr> aPrsList = aSelMgr->selection()->getSelected(ModuleBase_ISelection::Viewer);
325 if (aPrsList.size() > 0) {
326 bool isVisible = false;
327 bool isShading = false;
328 bool canBeShaded = false;
330 foreach(ModuleBase_ViewerPrsPtr aPrs, aPrsList) {
331 aObject = aPrs->object();
332 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
333 if (aRes && aRes->isDisplayed()) {
335 canBeShaded = myWorkshop->displayer()->canBeShaded(aObject);
336 isShading = (myWorkshop->displayer()->displayMode(aObject) == XGUI_Displayer::Shading);
342 XGUI_Displayer::DisplayMode aMode = aDisplayer->displayMode(aObject);
343 if (aMode != XGUI_Displayer::NoMode) {
344 action("WIREFRAME_CMD")->setEnabled(aMode == XGUI_Displayer::Shading);
345 action("SHADING_CMD")->setEnabled(aMode == XGUI_Displayer::Wireframe);
347 action("WIREFRAME_CMD")->setEnabled(true);
348 action("SHADING_CMD")->setEnabled(true);
351 action("SHOW_ONLY_CMD")->setEnabled(true);
352 action("HIDE_CMD")->setEnabled(true);
354 action("SHOW_CMD")->setEnabled(true);
356 if (myWorkshop->displayer()->objectsCount() > 0)
357 action("HIDEALL_CMD")->setEnabled(true);
359 // Update selection menu
360 QIntList aModes = aDisplayer->activeSelectionModes();
361 if (aModes.count() <= 1) {
362 action("SELECT_VERTEX_CMD")->setEnabled(true);
363 action("SELECT_EDGE_CMD")->setEnabled(true);
364 action("SELECT_FACE_CMD")->setEnabled(true);
365 action("SELECT_RESULT_CMD")->setEnabled(true);
366 if (aModes.count() == 1) {
367 switch (aModes.first()) {
369 action("SELECT_VERTEX_CMD")->setChecked(true);
372 action("SELECT_EDGE_CMD")->setChecked(true);
375 action("SELECT_FACE_CMD")->setChecked(true);
378 action("SELECT_RESULT_CMD")->setChecked(true);
381 action("SELECT_RESULT_CMD")->setChecked(true);
384 ModuleBase_IModule* aModule = myWorkshop->module();
386 aModule->updateViewerMenu(myActions);
388 if (myWorkshop->canChangeColor())
389 action("COLOR_CMD")->setEnabled(true);
391 action("DELETE_CMD")->setEnabled(true);
394 void XGUI_ContextMenuMgr::connectObjectBrowser()
396 connect(myWorkshop->objectBrowser(), SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,
397 SLOT(onContextMenuRequest(QContextMenuEvent*)));
400 void XGUI_ContextMenuMgr::connectViewer()
402 connect(myWorkshop->viewer(), SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,
403 SLOT(onContextMenuRequest(QContextMenuEvent*)));
407 void XGUI_ContextMenuMgr::buildObjBrowserMenu()
409 QAction* aSeparator = new QAction(this);
410 aSeparator->setSeparator(true);
414 // Result construction menu
415 aList.append(action("SHOW_CMD"));
416 aList.append(action("HIDE_CMD"));
417 aList.append(action("SHOW_ONLY_CMD"));
418 aList.append(mySeparator);
419 aList.append(action("RENAME_CMD"));
420 aList.append(action("COLOR_CMD"));
421 aList.append(action("SHOW_FEATURE_CMD"));
422 myObjBrowserMenus[ModelAPI_ResultConstruction::group()] = aList;
424 //-------------------------------------
427 aList.append(action("WIREFRAME_CMD"));
428 aList.append(action("SHADING_CMD"));
429 aList.append(mySeparator); // this separator is not shown as this action is added after show only
430 // qt list container contains only one instance of the same action
431 aList.append(action("SHOW_CMD"));
432 aList.append(action("HIDE_CMD"));
433 aList.append(action("SHOW_ONLY_CMD"));
434 aList.append(mySeparator);
435 aList.append(action("RENAME_CMD"));
436 aList.append(action("COLOR_CMD"));
437 aList.append(action("SHOW_FEATURE_CMD"));
438 myObjBrowserMenus[ModelAPI_ResultBody::group()] = aList;
440 myObjBrowserMenus[ModelAPI_ResultGroup::group()] = aList;
442 myObjBrowserMenus[ModelAPI_ResultPart::group()] = aList;
443 //-------------------------------------
446 aList.append(action("RENAME_CMD"));
447 aList.append(action("SHOW_RESULTS_CMD"));
448 aList.append(action("MOVE_CMD"));
449 aList.append(mySeparator);
450 aList.append(action("CLEAN_HISTORY_CMD"));
451 aList.append(action("DELETE_CMD"));
452 myObjBrowserMenus[ModelAPI_Feature::group()] = aList;
455 aList.append(action("RENAME_CMD"));
456 aList.append(mySeparator);
457 aList.append(action("CLEAN_HISTORY_CMD"));
458 aList.append(action("DELETE_CMD"));
459 myObjBrowserMenus[ModelAPI_ResultParameter::group()] = aList;
460 //-------------------------------------
463 void XGUI_ContextMenuMgr::buildViewerMenu()
466 // Result construction menu
467 aList.append(action("HIDE_CMD"));
468 aList.append(action("SHOW_ONLY_CMD"));
469 aList.append(mySeparator);
470 aList.append(action("COLOR_CMD"));
471 myViewerMenu[ModelAPI_ResultConstruction::group()] = aList;
473 myViewerMenu[ModelAPI_ResultPart::group()] = aList;
474 //-------------------------------------
477 aList.append(action("WIREFRAME_CMD"));
478 aList.append(action("SHADING_CMD"));
479 aList.append(mySeparator);
480 aList.append(action("HIDE_CMD"));
481 aList.append(action("SHOW_ONLY_CMD"));
482 aList.append(mySeparator);
483 aList.append(action("COLOR_CMD"));
484 myViewerMenu[ModelAPI_ResultBody::group()] = aList;
486 myViewerMenu[ModelAPI_ResultGroup::group()] = aList;
487 //-------------------------------------
491 void XGUI_ContextMenuMgr::addObjBrowserMenu(QMenu* theMenu) const
493 ModuleBase_IModule* aModule = myWorkshop->module();
495 theMenu->addSeparator();
496 aModule->addObjectBrowserMenu(theMenu);
499 XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
500 QObjectPtrList aObjects = aSelMgr->selection()->selectedObjects();
501 int aSelected = aObjects.size();
502 QActionsList aActions;
503 if (aSelected == 1) {
504 ObjectPtr aObject = aObjects.first();
505 std::string aName = aObject->groupName();
506 if (myObjBrowserMenus.contains(aName))
507 aActions = myObjBrowserMenus[aName];
508 } else if (aSelected > 1) {
509 aActions.append(action("WIREFRAME_CMD"));
510 aActions.append(action("SHADING_CMD"));
511 aActions.append(mySeparator);
512 aActions.append(action("SHOW_CMD"));
513 aActions.append(action("HIDE_CMD"));
514 aActions.append(action("SHOW_ONLY_CMD"));
515 aActions.append(mySeparator);
516 //aActions.append(action("MOVE_CMD"));
517 aActions.append(action("COLOR_CMD"));
518 aActions.append(action("CLEAN_HISTORY_CMD"));
519 aActions.append(action("DELETE_CMD"));
521 theMenu->addActions(aActions);
522 addFeatures(theMenu);
524 // It is commented out because Object Browser does not have actions
525 //theMenu->addSeparator();
526 //theMenu->addActions(myWorkshop->objectBrowser()->actions());
529 void XGUI_ContextMenuMgr::addViewerMenu(QMenu* theMenu) const
531 XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
532 QList<ModuleBase_ViewerPrsPtr> aPrsList = aSelMgr->selection()->getSelected(ModuleBase_ISelection::Viewer);
533 int aSelected = aPrsList.size();
534 QActionsList aActions;
536 // Create selection menu
537 XGUI_OperationMgr* aOpMgr = myWorkshop->operationMgr();
539 myWorkshop->module()->activeSelectionModes(aModes);
540 if ((!aOpMgr->hasOperation()) && aModes.isEmpty()) {
541 QMenu* aSelMenu = new QMenu(tr("Selection mode"), theMenu);
542 aSelMenu->addAction(action("SELECT_VERTEX_CMD"));
543 aSelMenu->addAction(action("SELECT_EDGE_CMD"));
544 aSelMenu->addAction(action("SELECT_FACE_CMD"));
545 aSelMenu->addAction(action("SELECT_RESULT_CMD"));
546 theMenu->addMenu(aSelMenu);
547 theMenu->addSeparator();
549 if (aSelected == 1) {
550 ObjectPtr aObject = aPrsList.first()->object();
551 if (aObject.get() != NULL) {
552 std::string aName = aObject->groupName();
553 if (myViewerMenu.contains(aName))
554 aActions = myViewerMenu[aName];
556 } else if (aSelected > 1) {
557 aActions.append(action("HIDE_CMD"));
559 // hide all is shown always even if selection in the viewer is empty
560 aActions.append(action("HIDEALL_CMD"));
561 aActions.append(action("COLOR_CMD"));
563 theMenu->addActions(aActions);
565 QMap<int, QAction*> aMenuActions;
566 ModuleBase_IModule* aModule = myWorkshop->module();
568 if (aModule->addViewerMenu(myActions, theMenu, aMenuActions))
569 theMenu->addSeparator();
572 // insert the module menu items on specific positions in the popup menu: some actions should be
573 // in the begin of the list, Delete action should be the last by #1343 issue
574 QList<QAction*> anActions = theMenu->actions();
575 int anActionsSize = anActions.size();
576 QAction* aFirstAction = anActions[0];
577 QMap<int, QAction*>::const_iterator anIt = aMenuActions.begin(), aLast = aMenuActions.end();
578 for (; anIt != aLast; anIt++) {
579 if (anIt.key() > anActionsSize)
580 theMenu->addAction(anIt.value());
582 theMenu->insertAction(aFirstAction, *anIt);
586 theMenu->addSeparator();
587 QMdiArea* aMDI = myWorkshop->mainWindow()->mdiArea();
588 if (aMDI->actions().size() > 0) {
589 QMenu* aSubMenu = theMenu->addMenu(tr("Windows"));
590 aSubMenu->addActions(aMDI->actions());
595 QStringList XGUI_ContextMenuMgr::actionObjectGroups(const QString& theName)
599 QMap<std::string, QActionsList>::const_iterator anIt = myObjBrowserMenus.begin(),
600 aLast = myObjBrowserMenus.end();
601 for (; anIt != aLast; anIt++) {
602 QString aGroupName(anIt.key().c_str());
603 if (aGroups.contains(aGroupName))
605 QActionsList anActions = anIt.value();
606 QActionsList::const_iterator anAIt = anActions.begin(), anALast = anActions.end();
608 for (; anAIt != anALast && !aFound; anAIt++)
609 aFound = (*anAIt)->data().toString() == theName;
611 aGroups.append(aGroupName);
616 void XGUI_ContextMenuMgr::onRename()
618 QObjectPtrList anObjects = myWorkshop->selector()->selection()->selectedObjects();
619 if (!myWorkshop->abortAllOperations())
621 // restore selection in case if dialog box was shown
622 myWorkshop->objectBrowser()->setObjectsSelected(anObjects);
623 myWorkshop->objectBrowser()->onEditItem();
626 void XGUI_ContextMenuMgr::addFeatures(QMenu* theMenu) const
628 SessionPtr aMgr = ModelAPI_Session::get();
629 DocumentPtr aActiveDoc = aMgr->activeDocument();
631 XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
632 XGUI_ActionsMgr* aActionMgr = myWorkshop->actionsMgr();
633 const Config_DataModelReader* aDataModelXML = myWorkshop->dataModelXMLReader();
634 QModelIndexList aSelectedIndexes = aSelMgr->selection()->selectedIndexes();
638 bool aIsRoot = false;
639 foreach(QModelIndex aIdx, aSelectedIndexes) {
640 // Process only first column
641 if (aIdx.column() == 0) {
642 aIsRoot = !aIdx.parent().isValid();
643 // Exit if the selected index belongs to non active document
644 if (aIsRoot && (aActiveDoc != aMgr->moduleDocument()))
646 if ((!aIsRoot) && (aIdx.internalPointer() != aActiveDoc.get()))
649 // Get name of the selected index
650 aName = aIdx.data().toString();
651 aLen = aName.indexOf('(');
653 aName = aName.left(--aLen);
655 std::string aFeaturesStr = aIsRoot?
656 aDataModelXML->rootFolderFeatures(aName.toStdString()) :
657 aDataModelXML->subFolderFeatures(aName.toStdString());
658 if (aFeaturesStr.length() > 0) {
659 QStringList aFeturesList =
660 QString(aFeaturesStr.c_str()).split(",", QString::SkipEmptyParts);
661 foreach(QString aFea, aFeturesList) {
662 QAction* aAction = aActionMgr->action(aFea);
664 theMenu->addAction(aAction);