[gimp] app: freeze drawable preview in transform tools
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: freeze drawable preview in transform tools
- Date: Wed, 15 Jan 2020 22:36:11 +0000 (UTC)
commit 2e26603a55ba669f305409aab336561db25a070b
Author: Ell <ell_se yahoo com>
Date: Thu Jan 16 00:14:15 2020 +0200
app: freeze drawable preview in transform tools
In GimpTransformGridTool, when transforming a drawable, freeze the
drawable's preview while the tool is active, so that its ancestors'
previews don't get unnecessarily updated in response to hiding it.
app/tools/gimptransformgridtool.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/app/tools/gimptransformgridtool.c b/app/tools/gimptransformgridtool.c
index 698014324d..78369e5ae7 100644
--- a/app/tools/gimptransformgridtool.c
+++ b/app/tools/gimptransformgridtool.c
@@ -37,6 +37,7 @@
#include "core/gimppickable.h"
#include "core/gimpprojection.h"
#include "core/gimptoolinfo.h"
+#include "core/gimpviewable.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimpstroke.h"
@@ -290,6 +291,9 @@ gimp_transform_grid_tool_initialize (GimpTool *tool,
tr_tool->object = object;
+ if (GIMP_IS_DRAWABLE (object))
+ gimp_viewable_preview_freeze (GIMP_VIEWABLE (object));
+
/* Initialize the transform_grid tool dialog */
if (! tg_tool->gui)
gimp_transform_grid_tool_dialog (tg_tool);
@@ -1086,7 +1090,13 @@ gimp_transform_grid_tool_halt (GimpTransformGridTool *tg_tool)
tool->display = NULL;
tool->drawable = NULL;
- tr_tool->object = NULL;
+ if (tr_tool->object)
+ {
+ if (GIMP_IS_DRAWABLE (tr_tool->object))
+ gimp_viewable_preview_thaw (GIMP_VIEWABLE (tr_tool->object));
+
+ tr_tool->object = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]