From 6b2f46595a5ecf3a24e3cd8eb8651ef2db4368d8 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 30 Mar 2012 13:43:20 +0200 Subject: [PATCH] Call InitializeNewTool after tool constructor to allow reading in state file --- vv/vvToolCreatorBase.txx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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(); } //------------------------------------------------------------------------------ -- 2.47.1