Commit Graph

107 Commits

Author SHA1 Message Date
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
6899b0bf60 app: GimpCageTool: go to deform mode only if the user clicked the first handle
and not if it was only moved.
2011-03-30 11:51:51 +02:00
f585788e46 app: tool control cleanup in GimpCageTool
Don't call tool_control functions twice in init(). Call activate() and
halt() only on button_press() and button_release() to indicate that
the tool wants motion events.
2011-03-30 11:48:05 +02:00
7c60bb5181 app: use more of the new GDK_KEY_foo key names
and move the compat defines from display-enums.h to widgets-enums.h
2011-03-29 17:24:08 +02:00
6fdcc5f465 app: add a progress indicator for cage transform
- add a double "progress" property to GimpOperationCageTransform
  and update it every 20 rows
- connect to the notify::progress in the tool and display a tool
  progress
2011-03-25 15:41:53 +01:00
41b905baa8 app: make GimpTool implement the GimpProgress interface properly
and remove the previously added quick hack. Change the cage progress
code to standard progress code, and use the tool progress also in
blend.
2011-03-25 10:55:07 +01:00
8daee72518 app: various GimpCageTool fixes
- completely halt the tool before starting it
- bail out on options changes when the tool is not active
- initialy set the mode to CAGE_CHANGE
- indentation, formatting, various small cleanups
2011-03-25 10:18:56 +01:00
e9dd30127a app: add an on-canvas progress facility to GimpTool
and use it in GimpCageTool.
2011-03-25 09:48:26 +01:00
1659f62e2c app: small style cleanup in the merged cage code 2011-03-23 22:29:00 +01:00
7056d38681 cagetool: implement rubber band selection for edit mode, if the cage is closed 2011-01-22 15:38:35 +01:00
aa98319f1b cage tool: implement options_notify to allow switching back to edit mode
and update fill option
2011-01-22 14:17:28 +01:00
3f581c37b6 cagetool: fix a drawing bug when adding point to the cage while moving cursor 2011-01-22 14:17:28 +01:00
f379f3c467 fix rubber band selection for layer with offset 2011-01-22 14:17:28 +01:00
e7d219d387 Cage tool: add rubber band selection for deform mode 2011-01-22 14:17:28 +01:00
dd28e1fe02 Implementation of the multi-selection in the cage tool and refactoring that come with.
This editing mode should work like the path tool.
The backup of the cages point for undo is replaced by a displacement that affect
all the selected point in CageConfig with commit/reset displacement.
2011-01-22 14:17:28 +01:00
006c7ab9f4 refactor of the GimpCageConfig with a custom GimpCagePoint data structure 2011-01-22 14:17:28 +01:00
23193cba2f Rewrite of the cage tool as a state machine 2011-01-22 14:17:28 +01:00
223ae53fcc app: set the cage tool's dirty mask so it is canceled upon image changes 2010-11-21 14:13:58 +01:00