Commit 629249b7 authored by David Thompson's avatar David Thompson Committed by Kitware Robot

Merge topic 'widget-names-for-tests'

7dc6660d Name "New Resource" menu and its items.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: T.J. Corona's avatarT.J. Corona <tj.corona@kitware.com>
Merge-request: !1746
parents edada9bc 7dc6660d
...@@ -243,6 +243,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu() ...@@ -243,6 +243,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu()
if (m_newMenu != nullptr) if (m_newMenu != nullptr)
{ {
m_newMenu->clear(); m_newMenu->clear();
m_newMenu->setObjectName("newResourceMenu");
bool visible = false; bool visible = false;
...@@ -278,6 +279,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu() ...@@ -278,6 +279,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu()
if (operationIndices.size() == 1) if (operationIndices.size() == 1)
{ {
QAction* newResourceAction = new QAction(label, m_newMenu); QAction* newResourceAction = new QAction(label, m_newMenu);
newResourceAction->setObjectName(QString::fromStdString(resourceName));
m_newMenu->addAction(newResourceAction); m_newMenu->addAction(newResourceAction);
std::string operationName = creatorGroup.operationName(*operationIndices.begin()); std::string operationName = creatorGroup.operationName(*operationIndices.begin());
...@@ -303,6 +305,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu() ...@@ -303,6 +305,7 @@ void pqSMTKNewResourceBehavior::updateNewMenu()
opLabel = *splitOpLabel.rbegin(); opLabel = *splitOpLabel.rbegin();
QAction* newResourceAction = new QAction(opLabel, resourceMenu); QAction* newResourceAction = new QAction(opLabel, resourceMenu);
newResourceAction->setObjectName(QString::fromStdString(operationName));
resourceMenu->addAction(newResourceAction); resourceMenu->addAction(newResourceAction);
new pqNewResourceReaction(operationName, newResourceAction); new pqNewResourceReaction(operationName, newResourceAction);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment