States of tools are lost when closing rt without opening an image in SETM, Issue 2779
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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 ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user