]> Creatis software - clitk.git/blobdiff - vv/vvToolCreatorBase.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolCreatorBase.cxx
index 671c0800e91456b06b669b55c3df1d4bcdf56304..075e3352913d6ed59123d7aa866e21cd35b0e5a1 100644 (file)
 #include <QMenu>
 
 //------------------------------------------------------------------------------
-vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false)
+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()));