<parameter name="PRP_CREATE_NEW_WINDOW_FOR_VIEWER_5" value="Alt+C"/>
<parameter name="PRP_CREATE_NEW_WINDOW_FOR_VIEWER_6" value="Alt+A"/>
<parameter name="PRP_CREATE_NEW_WINDOW_FOR_VIEWER_7" value="Alt+Y"/>
- <parameter name="PRP_DESK_FIND_ACTION" value="Ctrl+Space"/>
+ <parameter name="PRP_DESK_FIND_ACTION" value="Ctrl+Shift+Space"/>
<parameter name="PRP_CREATE_NEW_WINDOW_FOR_VIEWER_8" value="Alt+3"/>
<parameter name="#General/Object(s)/Show" value="Ctrl+Alt+S"/>
<parameter name="#General/Object(s)/Hide" value="Ctrl+Alt+H"/>
searchOptionsLayout->addWidget(myIncludeUnavailableActionsCB);
searchOptionsLayout->addWidget(myIncludeInactiveModulesCB);
- myFoundActionsTree = new QtxFoundActionTree();
+ myFoundActionsTree = new QtxFoundActionTree(this);
layout->addWidget(myFoundActionsTree);
connect(myQueryLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onQueryChanged(const QString&)));
-QtxFoundActionTree::QtxFoundActionTree()
+QtxFoundActionTree::QtxFoundActionTree(QtxFindActionDialog* theParent)
+: QTreeWidget(theParent)
{
setColumnCount(2);
setSelectionMode(QAbstractItemView::SingleSelection);
}
QtxFoundActionTreeAction* const actionItem = static_cast<QtxFoundActionTreeAction*>(theItem);
- actionItem->trigger();
+ if (actionItem->trigger())
+ static_cast<QtxFindActionDialog*>(parentWidget())->accept();
}
return std::find_if(actions.begin(), actions.end(), [](const QAction* const theAction){ return theAction->isEnabled(); }) != actions.end();
}
-void QtxFoundActionTreeAction::trigger() const
+bool QtxFoundActionTreeAction::trigger() const
{
+ bool res = false;
const auto& actions = SUIT_ShortcutMgr::get()->getActions(myModuleID, myInModuleActionID);
for (const auto& action : actions) {
- if (action->isEnabled())
+ if (action->isEnabled()) {
action->trigger();
+ res = true;
+ }
}
+ return res;
}
\ No newline at end of file
ToolTip
};
- QtxFoundActionTree();
+ QtxFoundActionTree(QtxFindActionDialog* theParent);
QtxFoundActionTree(const QtxFoundActionTree&) = delete;
QtxFoundActionTree& operator=(const QtxFoundActionTree&) = delete;
virtual ~QtxFoundActionTree() = default;
virtual bool isEnabled() const;
- void trigger() const;
+ bool trigger() const;
const QString myInModuleActionID;
};