mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#2020 Move LAS files. Support for submenus and command features with custom name and user data
This commit is contained in:
@@ -108,7 +108,21 @@ QAction* CmdFeatureManager::action(const QString& commandId, const QString& cust
|
||||
{
|
||||
std::pair<CmdFeature*, size_t> featurePair = createFeature(commandId.toStdString());
|
||||
|
||||
QAction* act = featurePair.first->action(customActionText);
|
||||
QAction* act = featurePair.first->actionWithCustomText(customActionText);
|
||||
m_actionToFeatureIdxMap[act] = featurePair.second;
|
||||
|
||||
return act;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get action for the specified command, with custom action text
|
||||
/// The action is owned by the PdmCommandItemManager
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QAction* CmdFeatureManager::actionWithUserData(const QString& commandId, const QString& customActionText, const QVariant& userData)
|
||||
{
|
||||
std::pair<CmdFeature*, size_t> featurePair = createFeature(commandId.toStdString());
|
||||
|
||||
QAction* act = featurePair.first->actionWithUserData(customActionText, userData);
|
||||
m_actionToFeatureIdxMap[act] = featurePair.second;
|
||||
|
||||
return act;
|
||||
|
||||
Reference in New Issue
Block a user