X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolCreatorBase.cxx;h=075e3352913d6ed59123d7aa866e21cd35b0e5a1;hb=a0bcf3084e5092bb1beccdbed6b2710f839346d9;hp=50a448941e8f524c0e567191f9356fa51264ff6b;hpb=6194949c0beb1589904e22381b9aba1bbface172;p=clitk.git diff --git a/vv/vvToolCreatorBase.cxx b/vv/vvToolCreatorBase.cxx index 50a4489..075e335 100644 --- a/vv/vvToolCreatorBase.cxx +++ b/vv/vvToolCreatorBase.cxx @@ -27,6 +27,8 @@ vvToolCreatorBase::vvToolCreatorBase(QString name): mAction(NULL), mExperimental 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()));