diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 1aa4ad7c9..94062e351 100755 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -32,7 +32,7 @@ using namespace rtengine::procparams; EditorPanel::EditorPanel (FilePanel* filePanel) - : beforePreviewHandler(NULL), beforeIarea(NULL), beforeBox(NULL), afterBox(NULL), afterHeaderBox(NULL), parent(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL), iHistoryShow(NULL), iHistoryHide(NULL), iBeforeLockON(NULL),iBeforeLockOFF(NULL), iRightPanel_1_Show(NULL), iRightPanel_1_Hide(NULL), iTopPanel_1_Show(NULL), iTopPanel_1_Hide(NULL), openThm(NULL) { + : beforePreviewHandler(NULL), beforeIarea(NULL), beforeBox(NULL), afterBox(NULL), afterHeaderBox(NULL), parent(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL), iHistoryShow(NULL), iHistoryHide(NULL), iBeforeLockON(NULL),iBeforeLockOFF(NULL), iRightPanel_1_Show(NULL), iRightPanel_1_Hide(NULL), iTopPanel_1_Show(NULL), iTopPanel_1_Hide(NULL), openThm(NULL), realized(false) { epih = new EditorPanelIdleHelper; epih->epanel = this; @@ -435,8 +435,8 @@ void EditorPanel::setAspect () { info->set_active (options.showInfo); } -void EditorPanel::on_realize () { - +void EditorPanel::on_realize () { + realized = true; Gtk::VBox::on_realize (); // This line is needed to avoid autoexpansion of the window :-/ vboxright->set_size_request (options.toolPanelWidth, -1); diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 22cade883..8d213d0cc 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -52,6 +52,7 @@ class EditorPanel : public Gtk::VBox, private: Glib::ustring lastSaveAsFileName; + bool realized; protected: Gtk::ProgressBar *progressLabel; @@ -134,7 +135,6 @@ class EditorPanel : public Gtk::VBox, public: - EditorPanel (FilePanel* filePanel = NULL); virtual ~EditorPanel (); @@ -148,7 +148,7 @@ class EditorPanel : public Gtk::VBox, void writeOptions(); void showTopPanel(bool show); - + bool isRealized() { return realized; } // progresslistener interface void setProgress (double p); void setProgressStr (Glib::ustring str); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 442d4da33..6aaa4a690 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -589,7 +589,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) { if( bpanel ) bpanel->saveOptions (); - if (isSingleTabMode() || simpleEditor) { + if ((isSingleTabMode() || simpleEditor) && epanel->isRealized()) { epanel->saveProfile(); epanel->writeOptions (); }