[gimp/metadata-browser] app: don't detach the floating selection if it's not attached
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: don't detach the floating selection if it's not attached
- Date: Wed, 28 Sep 2011 10:50:51 +0000 (UTC)
commit f0f80736c31f69d0147842dffc6161e52a4e599f
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 23 22:24:23 2011 +0200
app: don't detach the floating selection if it's not attached
Fix the commit two down in the log: a layer can be a floating
selection even if it's not attached to anything (when it is on the
undo stack). Don't detach it if it is not the underlying drawable's
current fs.
app/core/gimplayer.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index 2771b88..5666d27 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -406,7 +406,11 @@ gimp_layer_dispose (GObject *object)
{
GimpDrawable *fs_drawable = gimp_layer_get_floating_sel_drawable (layer);
- gimp_drawable_detach_floating_sel (fs_drawable);
+ /* only detach if this is actually the drawable's fs because the
+ * layer might be on the undo stack and not attached to anyhing
+ */
+ if (gimp_drawable_get_floating_sel (fs_drawable) == layer)
+ gimp_drawable_detach_floating_sel (fs_drawable);
}
G_OBJECT_CLASS (parent_class)->dispose (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]