]> Creatis software - clitk.git/blobdiff - vv/vvToolCreatorBase.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolCreatorBase.cxx
index 2744dd30e7ded2496082acd0f65e69ab6e602211..075e3352913d6ed59123d7aa866e21cd35b0e5a1 100644 (file)
 #include <QMenu>
 
 //------------------------------------------------------------------------------
-vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false), mAction(NULL)
+vvToolCreatorBase::vvToolCreatorBase(QString name): mAction(NULL), mExperimental(false)
 {
   mUseContextMenu = false;
   mToolName = name;
   m_MenuName = "Tools";
+  mReadStateFlag = false;
+  mImageIndex = 0;
   vvToolManager::GetInstance()->AddTool(this);
 }
 //------------------------------------------------------------------------------
@@ -51,9 +53,12 @@ void vvToolCreatorBase::InsertToolInMenu(vvMainWindowBase * m)
   // Create main action
   if (mToolIconFilename == "noicon")
     mAction = new QAction(QString("&").append(mToolMenuName), this);
-  else
+  else {
     mAction = new QAction(QIcon(mToolIconFilename),
                           QString("&").append(mToolMenuName), this);
+    mAction->setIconVisibleInMenu(true);
+  }
+
   mAction->setStatusTip(mToolTip);
   // Connect the action
   connect(mAction, SIGNAL(triggered()), this, SLOT(MenuToolSlot()));