From ddd6f0056c0aa56b94f2231b97987325ecab3c3b Mon Sep 17 00:00:00 2001 From: dsarrut Date: Tue, 22 Mar 2011 15:49:52 +0000 Subject: [PATCH] Correct bug in the filename when the same filename is used --- vv/vvSlicerManager.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index efcb585..9e66956 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -114,13 +114,16 @@ void vvSlicerManager::SetFilename(std::string filename, int number) mBaseFileName = vtksys::SystemTools::GetFilenameName(vtksys::SystemTools::GetFilenameWithoutLastExtension(mFileName)); mBaseFileNameNumber = number; - for(unsigned int i=0; iSetFileName(vtksys::SystemTools::GetFilenameWithoutLastExtension(filename)); - } - + mFileName = mBaseFileName; if (number != 0) { mFileName.append("_"+clitk::toString(number)); } + mFileName.append(vtksys::SystemTools::GetFilenameLastExtension(filename)); + + for(unsigned int i=0; iSetFileName(mFileName);//vtksys::SystemTools::GetFilenameWithoutLastExtension(filename)); + } + } //------------------------------------------------------------------------------ -- 2.47.1