From: dsarrut Date: Tue, 22 Mar 2011 15:49:52 +0000 (+0000) Subject: Correct bug in the filename when the same filename is used X-Git-Tag: v1.2.0~137 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ddd6f0056c0aa56b94f2231b97987325ecab3c3b;p=clitk.git Correct bug in the filename when the same filename is used --- 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)); + } + } //------------------------------------------------------------------------------