From: David Sarrut Date: Fri, 30 Mar 2012 11:43:20 +0000 (+0200) Subject: Call InitializeNewTool after tool constructor to allow reading in state file X-Git-Tag: v1.3.0~52^2~20 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6b2f46595a5ecf3a24e3cd8eb8651ef2db4368d8;p=clitk.git Call InitializeNewTool after tool constructor to allow reading in state file --- diff --git a/vv/vvToolCreatorBase.txx b/vv/vvToolCreatorBase.txx index fbe8d6f..5aa6483 100644 --- a/vv/vvToolCreatorBase.txx +++ b/vv/vvToolCreatorBase.txx @@ -16,6 +16,7 @@ - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ===========================================================================**/ +//------------------------------------------------------------------------------ template void vvToolCreatorBase::CreateTool() { @@ -23,11 +24,17 @@ void vvToolCreatorBase::CreateTool() mMainWindow->UpdateCurrentSlicer(); // Create the tool ToolType * tool = new ToolType(mMainWindow, Qt::Dialog); - tool->setSender(mSender); // Put it in the list of open tools mListOfTool.push_back(tool); + + // Set some parameters + tool->SetCreator(this); + tool->setSender(mSender); + if (mReadStateFlag) tool->SetXmlReader(m_XmlReader.get(), mImageIndex); + tool->InitializeNewTool(mReadStateFlag); + // Go ! - tool->show(); + if (tool) tool->show(); } //------------------------------------------------------------------------------