Correct crash when closing editor Panel with hidden history

Remeber last option about hidden/shown panel
This commit is contained in:
ffsup2
2010-07-14 22:11:07 +02:00
parent 24ae99fb02
commit f16761ac95
2 changed files with 7 additions and 5 deletions

View File

@@ -466,6 +466,7 @@ void EditorPanel::hideHistoryActivated () {
removeIfThere (hpanedl, leftbox, false); removeIfThere (hpanedl, leftbox, false);
if (hidehp->get_active()) if (hidehp->get_active())
hpanedl->pack1 (*leftbox, false, true); hpanedl->pack1 (*leftbox, false, true);
options.showHistory = hidehp->get_active();
} }
bool EditorPanel::handleShortcutKey (GdkEventKey* event) { bool EditorPanel::handleShortcutKey (GdkEventKey* event) {

View File

@@ -20,17 +20,18 @@
#include <guiutils.h> #include <guiutils.h>
#include <imagearea.h> #include <imagearea.h>
PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), isMoving(false) { PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), isMoving(false),cCropMoving(NULL),cNormal(NULL) {
rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) ); rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) );
} }
PreviewWindow::~PreviewWindow () { PreviewWindow::~PreviewWindow () {
if( cCropMoving )
delete cCropMoving; delete cCropMoving;
#ifndef WIN32 if( cNormal )
delete cNormal; delete cNormal;
#endif
} }
void PreviewWindow::on_realize () { void PreviewWindow::on_realize () {