Temporary file has wrong filename when switching to another image while 'Edit current image in external editor' is processing, Issue 2699

This commit is contained in:
Ingo
2015-03-03 00:58:17 +01:00
parent 7b99e16a31
commit 59144566d9
2 changed files with 5 additions and 5 deletions

View File

@@ -1270,7 +1270,7 @@ void EditorPanel::sendToGimpPressed () {
rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
ProgressConnector<rtengine::IImage16*> *ld = new ProgressConnector<rtengine::IImage16*>();
ld->startFunc(sigc::bind(sigc::ptr_fun(&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ),
sigc::bind(sigc::mem_fun( *this,&EditorPanel::idle_sendToGimp ),ld ));
sigc::bind(sigc::mem_fun( *this,&EditorPanel::idle_sendToGimp ),ld, openThm->getFileName() ));
saveimgas->set_sensitive(false);
sendtogimp->set_sensitive(false);
}
@@ -1291,13 +1291,13 @@ void EditorPanel::syncFileBrowser() { // synchronize filebrowser with image in E
fPanel->fileCatalog->selectImage(fname, true);
}
bool EditorPanel::idle_sendToGimp( ProgressConnector<rtengine::IImage16*> *pc){
bool EditorPanel::idle_sendToGimp( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname){
rtengine::IImage16* img = pc->returnValue();
delete pc;
if (img) {
// get file name base
Glib::ustring shortname = removeExtension (Glib::path_get_basename (openThm->getFileName()));
// get file name base
Glib::ustring shortname = removeExtension (Glib::path_get_basename (fname));
Glib::ustring dirname = Glib::get_tmp_dir ();
Glib::ustring fname = Glib::build_filename (dirname, shortname);