Salome HOME
Issue #1701 Preselecting before calling constraints does not put objects in the input...
[modules/shaper.git] / src / ModuleBase / ModuleBase_ActionInfo.cpp
index 9089ecaf020b43c4a38f5b63556d4379530786a9..35721b3585ce359551e7bd3a763d156d38236799 100644 (file)
@@ -1,3 +1,4 @@
+// TEMPORARY COMMIT
 /*
  * ModuleBase_ActionInfo.cpp
  *
@@ -6,6 +7,7 @@
  */
 
 #include <ModuleBase_ActionInfo.h>
+#include <ModuleBase_IconFactory.h>
 
 ModuleBase_ActionInfo::ModuleBase_ActionInfo()
 {
@@ -53,7 +55,7 @@ void ModuleBase_ActionInfo::initFrom(std::shared_ptr<Config_FeatureMessage> theM
   id = QString::fromStdString(theMessage->id());
   iconFile = QString::fromStdString(theMessage->icon());
   if (!iconFile.isEmpty()) {
-    icon = QIcon(iconFile);
+    icon = ModuleBase_IconFactory::loadIcon(iconFile);
   }
   text = QString::fromStdString(theMessage->text());
   toolTip = QString::fromStdString(theMessage->tooltip());
@@ -63,24 +65,8 @@ void ModuleBase_ActionInfo::initFrom(std::shared_ptr<Config_FeatureMessage> theM
   }
   // If feature requires PropertyPannel for input, it should be checkable
   checkable = theMessage->isUseInput();
-}
-
-QAction* ModuleBase_ActionInfo::makeAction(QObject* theParent)
-{
-  QAction* aResult = new QAction(icon, text, theParent);
-  aResult->setCheckable(checkable);
-  aResult->setChecked(checked);
-  aResult->setEnabled(enabled);
-  aResult->setVisible(visible);
-  aResult->setIconText(iconText);
-  aResult->setToolTip(toolTip);
-  // aResult->setStatusTip(statusTip);
-  // aResult->setWhatsThis(whatsThis);
-  aResult->setShortcut(shortcut);
-  aResult->setFont(font);
-  // By convenience, QAction for a feature keeps feature's id as data (QVariant);
-  aResult->setData(id);
-  return aResult;
+  // If Feature requires modal Dialog box for input
+  modal = theMessage->isModal();
 }
 
 void ModuleBase_ActionInfo::initDefault()