From 3c2f8189a5e834c1f2aa53230da69b97e3171e81 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Sun, 21 May 2006 20:36:01 +0000 Subject: call GC::request_early_collection() after switching preview images (bzr r923) --- src/dialogs/filedialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/dialogs/filedialog.cpp') diff --git a/src/dialogs/filedialog.cpp b/src/dialogs/filedialog.cpp index bf9eaceb5..fb6e599a8 100644 --- a/src/dialogs/filedialog.cpp +++ b/src/dialogs/filedialog.cpp @@ -45,6 +45,7 @@ #include "inkscape.h" #include "svg-view-widget.h" #include "filedialog.h" +#include "gc-core.h" #undef INK_DUMP_FILENAME_CONV @@ -175,6 +176,8 @@ bool SVGPreview::setFromMem(char const *xmlBuffer) sp_document_unref(doc); + Inkscape::GC::request_early_collection(); + return true; } @@ -675,10 +678,8 @@ private: void FileOpenDialogImpl::updatePreviewCallback() { Glib::ustring fileName = get_preview_filename(); - if (fileName.length() < 1) return; - svgPreview.set(fileName, dialogType); } @@ -897,6 +898,7 @@ FileOpenDialogImpl::show() set_modal (TRUE); //Window sp_transientize((GtkWidget *)gobj()); //Make transient gint b = run(); //Dialog + svgPreview.showNoPreview(); hide(); if (b == Gtk::RESPONSE_OK) @@ -1344,6 +1346,7 @@ FileSaveDialogImpl::show() set_modal (TRUE); //Window sp_transientize((GtkWidget *)gobj()); //Make transient gint b = run(); //Dialog + svgPreview.showNoPreview(); hide(); if (b == Gtk::RESPONSE_OK) -- cgit v1.2.3