Workaround for issue 1794: "Cannot save image or PP3 from Image Editor" ; properly catching exceptions on Windows should be preferred ; this patch is a clean fix for Linux and MacOS
This commit is contained in:
@@ -255,6 +255,15 @@ void SaveAsDialog::setInitialFileName (Glib::ustring fname) {
|
||||
|
||||
void SaveAsDialog::setImagePath (Glib::ustring ipath) {
|
||||
|
||||
Glib::ustring path = Glib::path_get_dirname(ipath);
|
||||
|
||||
//Add the image's path to the Shortcut list
|
||||
fchooser->add_shortcut_folder(Glib::path_get_dirname(ipath));
|
||||
#ifdef WIN32
|
||||
// Dirty workaround, waiting for a clean solution by using exceptions!
|
||||
if (!safe_is_root_dir(path))
|
||||
#endif
|
||||
try {
|
||||
fchooser->add_shortcut_folder(Glib::path_get_dirname(path));
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user