Commit Graph

124 Commits

Author SHA1 Message Date
03af9da83b app: GimpTool multi-drawable aware.
Right now I don't change the logics of any of the tools, except that the
GimpTool class now stores a list of drawables instead of a single
drawable. This can be later used on a case-by-case basis to make various
tools actually work on multiple drawables.
2020-05-26 14:15:17 +02:00
e47936182e app: some formatting in the edit non-visible layers code 2019-06-24 15:57:21 +02:00
39c71c6fb3 app: Add initial support for configurable editing of non-visible layers (Issue #2713)
Add a "edit-non-visible" configuration option, found under
Edit->Preferences->Tool Options as "Allow editing on non-visible layers"
2019-06-23 16:15:59 +03:00
Ell
158705e4ef app: fix cursor precision of various tools
Fix the cursor precision of the cage-transform, foreground-select,
n-point deformation, and warp-transform tools.
2019-01-31 04:39:37 -05:00
Ell
637105b962 app: in all tools, blink lock box when the current item is locked
In all tools, when the current item can't be edited due to its lock
mask, use gimp_tools_blink_lock_box(), added in the previous
commit,to blink the lock box of the corresponding dockable, in
addition to showing an error message in the status bar, to hint at
the source of the error.
2018-12-10 08:55:17 -05:00
49dfc6143d Issue #1662 - GIMP crashes while using cage transform when selection is active
Fixed by implementing Massimo's two findings:

gimp_operation_cage_transform_process(): if aux_buf is NULL, bail out
after initializing out_buf with identity vectors, fixes the crash.

gimp_cage_tool_create_filter(): set the drawable filter's region to
GIMP_FILTER_REGION_DRAWABLE, fixes offset when there is a selection.
2018-08-07 20:09:35 +02:00
5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
8f6c0fd17c app: use some canvas item highlighting in GimpCageTool
and don't draw two handles on top of each other for selected points.
2017-07-11 12:43:24 +02:00
ef294f4a54 app: clean up how tools are COMMITed and HALTed
Call HALT generically in gimp_tool_control() after calling COMMIT, and
remove all hacks in tools that call both COMMIT and HALT or call
halt() from commit().

Some tools interact with their subclasses (e.g. filter tool and
operation tool), and it's essential that COMMIT runs through the
entire class hierarchy before HALT.

Probably breaks something, please test.
2017-07-09 16:25:42 +02:00
dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
2bca4b25e0 Bug 777911 - Cage Transform edits locked, invisible and group layers
Fix cage transform to refuse to work on locked, invisible and group
layers. Add GimpTool::initialize() implementation so the generic
"drawable has changed" mechanism triggers the right response.
2017-02-08 19:28:14 +01:00
80f528a798 app: reorder and clean up stuff in the cage tool before starting fixes 2017-02-07 22:18:01 +01:00
9fb70a44f2 app: rename GimpImageMap to GimpDrawableFilter
and gimpdrawable-filter.[ch] to gimpdrawable-filters.[ch] because of
the name clash.
2016-05-12 01:49:53 +02:00
de4bc99448 Bug 763135 - Gimp cage tool doesn't work anymore
Fix various bugs, most importantly make sure the cage node is
properly updated when the config changes.
2016-03-23 23:00:48 +01:00
f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
7ec04e4afe app: get rid of hardcoding GDK_SHIFT_MASK in tools/
gimp_suggest_modifiers(): change "shift_format" and "control_format"
parameters to "extend_selection_format" and "toggle_behavior_format",
which fixes the longstanding problem that the function did the right
thing only by accident.

tools: use gimp_get_extend_selection_mask() instead of GDK_SHIFT_MASK
which is not 100% semantically correct in all cases, but at least a
step in the right direction to make the tool modifiers easier to
improve.
2015-10-17 15:31:08 +02:00
3f523dc88b app: some cosmetic cleanup in the cage tool 2015-03-02 01:02:06 +01:00
af64a104c3 Bug 741352: Cage tool crashes pressing Enter after Esc 2014-12-11 18:37:49 +01:00
a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
f4803af808 app: add boolean "cancelable" API to GimpImageMap and gimpdrawable-filter.[ch]
Return booleans indicating success (FALSE == user has canceled), and
allow canceling only in GimpImageMapTool for now.
2014-06-30 01:06:04 +02:00
88e4d7e468 app: commit ongoing tool operations on tool change instead of cancelling
On tool change, we used to simply halt tools before switching to the
new one, which meant losing ongoing live-previewed tool changes, like
transforms, warps and color corrections. This change makes them being
applied to the image instead before switching to the new tool:

Add enum value GIMP_TOOL_ACTION_COMMIT that is passed to
GimpTool::control() before tool switching. Handle the new enum value
in all tools, and actually commit the previewed stuff. This changes
the behavior of GimpCageTool, GimpImageMapTool, GimpTransformTool and
GimpWarpTool.
2014-04-04 22:34:26 +02:00
ac0ac60ca9 Bug 708521 - Getting rid of cage_complete property on GimpCageTool, redundant with tool_state. 2013-09-22 02:28:30 +12:00
2294b8da26 Bug 708519 - Fix using Backspace to delete a closed cage tool's points. 2013-09-22 02:17:22 +12:00
5e331e1d25 Bug 708517: Assertion on cage tool commit with ENTER + fix cage completion with ENTER.
The key press handler must return TRUE on successfully processing the key,
otherwise the handler ends up being run several times.
2013-09-21 22:42:41 +12:00
2e8ef97c13 Bug 701803 - Cage Transform raises segmentation fault...
...if layer bounds are changed.

Call gimp_tool_control_set_preserve (tool->control, FALSE) so it is
stopped when the drawable changes.
2013-06-18 19:05:54 +02:00
ef917b2c5c app: add an "area" parameter to gimp_image_map_apply()
and only update the drawable in that area if it's not NULL. Useful for
expensive interactive operations like warp, where the tool exactly
knows which area has changed.
2013-05-18 01:45:01 +02:00
a80795e222 app: remove "GeglRectangle visible" from gimp_image_map_apply()
because we now use a filter and the image projection updates
the visible part only.
2013-04-22 00:29:38 +02:00
e3b2a54da7 app: add a stock_id to GimpImageMap and use it for its filter
Refactor GimpImageMapTool and GimpOperationTool to set the stock_id,
and to be a bit smarter with the image map's undo string.
2013-04-16 20:32:58 +02:00
1e17f0aed1 app: port GimpImageMap to use the new drawable filters
which makes live update more responsive and removes tons of code, but
adds a delay with progress when finally committing the effect.
2013-04-12 14:35:27 +02:00
e546f2b43b Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
2012-09-06 23:55:35 +02:00
078128bb09 Bug 678890 - Selection box handles do not respond after changing layer
Make sure that temporarily setting/unsetting tool->control's "preserve
tool across image changes" does not mess up the default value:

Introduce gimp_tool_control_push/pop_preserve() which restores the old
state automatically, and use it in all tools, instead of saying
set_preserve(TRUE/FALSE) around image changes.
2012-07-26 18:17:01 +02:00
bec5a7e805 cage tool: fix handle added in the wrong side of the cage
This happened when:
1) cage still open
2) clicking on the edge between the first and the last handle
2012-05-11 12:34:53 +09:00
d9ba8b81da Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.
Just check if there is enough handles before closing
2012-05-11 12:02:58 +09:00
7101ee191a app: move all GEGL operations to new directory app/operations/ 2012-05-10 21:22:44 +02:00
797e622734 app: remove obsolete include 2012-05-02 17:50:52 +02:00
89d525c970 app: remove legacy support from GimpImageMap 2012-05-02 17:50:40 +02:00
3a48101b9d app: use below new function for shapeburst blend and cage tool progress 2012-05-02 17:50:37 +02:00
17f92b7379 app: the destroy functions are gone from GEGL, use g_object_unref() instead 2012-03-29 22:21:05 +01:00
439f7f579a app: s/Babl/const Babl/ 2012-03-24 18:52:31 +01:00
40e564711c gimpcagetool: remove unused parameter for gimp_cage_tool_compute_coef 2011-06-28 23:25:13 +02:00
989b85988b Cage tool: allow to add handle by clicking on an edge 2011-05-03 00:46:42 +02:00
cc247b3e66 Cage tool: in cage mode, remove selected handles when hitting backspace 2011-05-03 00:46:42 +02:00
5d771014d4 GimpCageConfig: use a GArray to store cage's point, to make easier
further improvement
2011-04-20 18:50:17 +02:00
7f6d06d3e9 cagetool: fix buffer leak 2011-04-05 10:18:07 +02:00
2200b80033 cagetool: fix the restoration of the image when going back to edit mode 2011-04-05 00:05:56 +02:00
ec25c6be42 cage tool: fix transformed area going away when setting a cage,
going back to edit mode, edit the cage then going to deform mode
2011-04-05 00:05:56 +02:00
d90de689fb app: GimpCageTool: in CAGE_CHANGE mode, switch to DEFORM when enter is pressed 2011-04-01 22:56:33 +02:00
a7f32f2290 app: move shutdown code from gimp_cage_tool_halt() to control(HALT) 2011-04-01 22:56:33 +02:00