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); rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
ProgressConnector<rtengine::IImage16*> *ld = new ProgressConnector<rtengine::IImage16*>(); ProgressConnector<rtengine::IImage16*> *ld = new ProgressConnector<rtengine::IImage16*>();
ld->startFunc(sigc::bind(sigc::ptr_fun(&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), 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); saveimgas->set_sensitive(false);
sendtogimp->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); 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(); rtengine::IImage16* img = pc->returnValue();
delete pc; delete pc;
if (img) { if (img) {
// get file name base // get file name base
Glib::ustring shortname = removeExtension (Glib::path_get_basename (openThm->getFileName())); Glib::ustring shortname = removeExtension (Glib::path_get_basename (fname));
Glib::ustring dirname = Glib::get_tmp_dir (); Glib::ustring dirname = Glib::get_tmp_dir ();
Glib::ustring fname = Glib::build_filename (dirname, shortname); Glib::ustring fname = Glib::build_filename (dirname, shortname);

View File

@@ -122,7 +122,7 @@ class EditorPanel : public Gtk::VBox,
BatchQueueEntry* createBatchQueueEntry (); BatchQueueEntry* createBatchQueueEntry ();
bool idle_imageSaved(ProgressConnector<int> *pc,rtengine::IImage16* img,Glib::ustring fname, SaveFormat sf); bool idle_imageSaved(ProgressConnector<int> *pc,rtengine::IImage16* img,Glib::ustring fname, SaveFormat sf);
bool idle_saveImage(ProgressConnector<rtengine::IImage16*> *pc,Glib::ustring fname, SaveFormat sf); bool idle_saveImage(ProgressConnector<rtengine::IImage16*> *pc,Glib::ustring fname, SaveFormat sf);
bool idle_sendToGimp( ProgressConnector<rtengine::IImage16*> *pc); bool idle_sendToGimp( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname);
bool idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16* img,Glib::ustring filename); bool idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16* img,Glib::ustring filename);
int err; int err;