X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCreatorBase.cxx;h=075e3352913d6ed59123d7aa866e21cd35b0e5a1;hb=8b0f32e46083e5fbc2efe128c9eae002f129cbd8;hp=671c0800e91456b06b669b55c3df1d4bcdf56304;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/vv/vvToolCreatorBase.cxx b/vv/vvToolCreatorBase.cxx index 671c080..075e335 100644 --- a/vv/vvToolCreatorBase.cxx +++ b/vv/vvToolCreatorBase.cxx @@ -22,11 +22,13 @@ #include //------------------------------------------------------------------------------ -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()));