summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-03-12 07:09:48 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-03-13 18:17:39 +0000
commit08484739383a06e9abe4e943c9e0cddfaa21603b (patch)
tree37346c818f643154e322ad9d719b9883f9539cd6 /src
parentMove Calligraphy preset names to more appropriate place. (diff)
downloadinkscape-08484739383a06e9abe4e943c9e0cddfaa21603b.tar.gz
inkscape-08484739383a06e9abe4e943c9e0cddfaa21603b.zip
Revert Icon Preview behaviour
* Fix crash on close with Icon Preview. * Force update of icons with `set`. * Set minimum width for Icon Preview's Magnified so it is not hidden on startup. Fixes https://gitlab.com/inkscape/inkscape/issues/109
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/icon-preview.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index bec6298d5..175d1ca66 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -226,7 +226,7 @@ IconPreviewPanel::IconPreviewPanel() :
}
iconBox.pack_start(splitter);
- splitter.pack1( *magBox, true, true );
+ splitter.pack1( *magBox, true, false );
UI::Widget::Frame *actuals = Gtk::manage(new UI::Widget::Frame (_("Actual Size:")));
actuals->add(*verts);
splitter.pack2( *actuals, false, false );
@@ -341,7 +341,7 @@ void IconPreviewPanel::refreshPreview()
#endif //ICON_VERBOSE
// Do not refresh too quickly
queueRefresh();
- } else if ( desktop ) {
+ } else if ( desktop && desktop->doc() ) {
#if ICON_VERBOSE
g_message( "%s Refreshing preview.", getTimestr().c_str() );
#endif // ICON_VERBOSE
@@ -641,7 +641,8 @@ void IconPreviewPanel::renderPreview( SPObject* obj )
} else {
memset( pixMem[i], 0, sizes[i] * stride );
}
- images[i]->queue_draw();
+ images[i]->set(images[i]->get_pixbuf());
+ // images[i]->queue_draw();
}
updateMagnify();
@@ -658,8 +659,8 @@ void IconPreviewPanel::updateMagnify()
Glib::RefPtr<Gdk::Pixbuf> buf = images[hot]->get_pixbuf()->scale_simple( 128, 128, Gdk::INTERP_NEAREST );
magLabel.set_label( *labels[hot] );
magnified.set( buf );
- magnified.queue_draw();
- magnified.get_parent()->queue_draw();
+ // magnified.queue_draw();
+ // magnified.get_parent()->queue_draw();
}
} //namespace Dialogs