Code

Speedup when switching types by avoiding setting to a directory we are already set to
authorjoncruz <joncruz@users.sourceforge.net>
Sat, 3 Mar 2007 05:53:38 +0000 (05:53 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sat, 3 Mar 2007 05:53:38 +0000 (05:53 +0000)
src/ui/dialog/filedialog.cpp

index 0f74c62417200a0dd2794c27cd2c96f11768b92d..81404a2dea7a204ed8748ae20c880ec8c9c62ce3 100644 (file)
@@ -1522,7 +1522,9 @@ FileSaveDialogImpl::change_path(const Glib::ustring& path)
             set_filename(myFilename);
         } else {
             std::string dirName = Glib::path_get_dirname( myFilename  );
-            set_current_folder(dirName);
+            if ( dirName != get_current_folder() ) {
+                set_current_folder(dirName);
+            }
         }
         Glib::ustring basename = Glib::path_get_basename(myFilename);
         //fprintf(stderr,"set_current_name(%s)\n",basename.c_str());