Commit Graph

322 Commits

Author SHA1 Message Date
Clayton Walker df21310b0f app: properly initialize variables 2013-06-23 01:41:50 +02:00
Michael Natterer 90797f0927 app: add an embedding toggling test button to the transform dialogs 2013-06-08 01:33:35 +02:00
Michael Natterer ad8d12ed69 app: add "response" signal to GimpToolGui
and connect to it instead of to gimp_tool_gui_get_dialog()'s signal.
One more step towards on-the-fly embedding/detaching.
2013-06-07 23:45:11 +02:00
Michael Natterer 9a811d276e app: add gimp_tool_gui_set_alternative_button_order() and use it
Also make some of GimpToolGui's memory management proper, there was
no leak but it needs to be proper in order to add runtime switching
between dialog and overlay.
2013-06-07 15:18:24 +02:00
Michael Natterer 88387d6e8d app: remove the "shell" parameter from gimp_tool_dialog_new() and gui_new() 2013-06-07 12:19:42 +02:00
Michael Natterer 1c20940f82 app: use a GimpToolGui in GimpTransformTool 2013-06-07 11:52:48 +02:00
Michael Natterer 785436f32e app: don't crash the flip tool on each click
Don't push an internal transform tool undo after invoking the flip
special case of directly transforming on each click, because the
transform clears the tool state and there is nothing to undo anyway
(flip is atomic). Additionally, add a precondition check to
gimp_transform_tool_push_internal_undo().
2013-06-06 02:08:00 +02:00
Michael Natterer 3b68ae0f3c app, pdb, libgimp: Remove all traces of the supersampling recursion level
from all transform APIs. This is no longer used since we use GEGL to
transform, the value was only passed around and never used.
2013-05-31 01:15:32 +02:00
Massimo Valentini 0a31b29b9a app: transform_tool - don't flush the image when display is NULL
it means the dialog is being deleted
2013-05-29 20:10:33 +02:00
Michael Natterer e3ef19ec89 app: don't gimp_display_get_image(NULL) in gimp_transform_tool_response() 2013-05-29 19:41:54 +02:00
Michael Natterer fdfa2c782d app: integrate transform tool undo with normal image undo
Also clean up formatting a bit, and add gimp_transform_tool_halt()
which really cleans the tool's state, so we don't end up with wrong
undo/redo actions in a new tool interaction.
2013-05-23 16:02:42 +02:00
darkraid1 ac5428787e Bug 598523 - Protect hidden layers from editing
Don't allow tool operations on invisible items, just like we do for
group layers or locked items.

Cleaned up and enhanced the patch a bit --Mitch
2013-05-13 23:29:43 +02:00
Mikael Magnusson 8cc53bbbdf app: forgot to invert the matrix in corrective mode when transforming the selection. 2013-04-23 17:15:23 +02:00
Michael Natterer e5112fa540 Bug 690900 - Typo in GIMP UI
Fix typo in gimptransformtool.c
2012-12-30 20:38:37 +01:00
Michael Natterer d4933b3052 Bug 674160 - Redesign of "Lock panel"
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.

Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
2012-11-09 11:17:25 +01:00
Mikael Magnusson da795c1267 gimptransformtool: Restore code that apparently was for the flip tool 2012-09-20 15:18:00 +02:00
Michael Natterer 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
Mikael Magnusson 6396e83057 transformtool: use new corner and side cursors appropriately considering current transform 2012-08-27 15:07:15 +02:00
Mikael Magnusson e83b40982f transformtool: adjust handles a bit
Since the move handle is gone, the pivot can be normal sized and circle again,
also put shear handles at 3/4 rather than 3/5.
2012-08-22 22:49:45 +02:00
Michael Natterer 95584e5548 app: re-format a comment in gimptransformtool.c 2012-08-22 20:41:44 +02:00
Mikael Magnusson 8dfc72dca9 transformtool: Make real_pick_function and real_draw_gui implementations of vfuncs 2012-08-21 20:59:15 +02:00
Michael Natterer b1acd93f5e Some formatting cleanup in the unified transform tool commits 2012-08-21 19:50:01 +02:00
Mikael Magnusson 08cd798ec6 transformtool: Set the cursor and tool cursor properly on each handle by way of the new cursor_update method 2012-08-20 20:28:21 +02:00
Mikael Magnusson 574df2b6db transformtool: We show corrective preview for selections and paths, so why not drawables 2012-08-20 15:46:47 +02:00
Mikael Magnusson f84987de73 transformtool: Add the bunch of 8 separate options for 3 things 2012-08-20 15:46:46 +02:00
Mikael Magnusson 03117bdf40 transformtool: Update modifier keys for options, solves problem with perspective frompivot + constrain 2012-08-20 15:46:46 +02:00
Mikael Magnusson 501c15f910 transformtool: Add a pick_function method to the TransformTool class and remove some more hack duplication 2012-08-20 15:46:46 +02:00
Mikael Magnusson 293600c579 transformtool: Add a draw_gui method to the TransformTool class and remove some hack duplication 2012-08-20 15:46:46 +02:00
Mikael Magnusson 615b5fabfd transformtool: Add the five options instead of just two 2012-08-20 15:41:55 +02:00
Mikael Magnusson 003ccf2aec transformtool: Enable hit detection for new handles 2012-08-20 15:22:22 +02:00
Mikael Magnusson c4143ff209 transformtool: Remove shift-clicking to accept transform since shift is used as a modifier 2012-08-20 15:22:22 +02:00
Mikael Magnusson 362afb122a transformtool: Try to straighten out modifiers 2012-08-20 15:22:21 +02:00
Mikael Magnusson 99f9d4d219 transformtool: add old "new" unified transformation tool
This is the proof of concept code I wrote before gsoc, with very naive
behaviour and simple interface.
2012-08-20 15:22:21 +02:00
Mikael Magnusson f5b08f33aa transformtool: Infinite undo
add undo and redo buttons, can undo all interactions. The reset button
is equivalent to undoing all operations and lets you press redo to get
back to before you reset. Doing something after undo will of course
clear all redo events.
2012-08-20 15:22:21 +02:00
Mikael Magnusson c883c761df transformtool: calculate center handle position correctly, add pivot handle
and use pivot handle in rotatetool so it works as before.
2012-08-20 15:22:21 +02:00
Michael Natterer 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
Michael Natterer 7d9cd6a413 app: don't hardcode "Y u8" when checking whether to clip transformed buffers
instead, check if the format has alpha.
2012-05-02 17:51:08 +02:00
Michael Natterer f8f4455459 app: change GimpDrawable::set_tiles() to ::set_buffer()
and remove the "type" argument, GeglBuffers have a format.
2012-05-02 17:46:07 +02:00
Michael Natterer 525a405270 app: port the entire transform API from TileManager to GeglBuffer 2012-05-02 17:46:06 +02:00
Michael Natterer 58dfa962a1 app: port simple rotating and flipping to GEGL
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
Michael Natterer 2c62644f94 app: BoundSeg -> GimpBoundSeg, boundary_foo() -> gimp_boundary_foo() 2012-05-02 17:46:02 +02:00
Michael Natterer 9323c2f28c app: move base/boundary.[ch] to core/gimpboundary.[ch]
No other changes yet, just make the move build.
2012-05-02 17:46:02 +02:00
Michael Natterer 24e6b20be8 Bug 674373 - Resizing Mask size is making gimp to crash
gimp_transform_tool_real_transform(): make sure we clip layer masks
and channels to their original extents also when transforming them
completely (not just a selection of them).
2012-04-21 22:42:53 +02:00
Michael Natterer 38b8f0596d app: use the new modifier API instead of constants in all tools
There are still many uses of literal SHIFT and MOD1 left, but all uses
of CONTROL are gone. Should work exactly as before on Win/X11, and
still has some glitches on OSX.
2011-10-06 21:59:07 +02:00
Massimo Valentini 27feccc4a4 Do not access transform tool handles if NULL or stales
For example starting GIMP and pressing

Ctrl-N Enter Shift-T (or Shift-R or Shift-P)

showed warnings on the console, and with window manager's
focus mode set to 'click' it was also possible to crash GIMP.
2011-09-13 18:12:35 +02:00
Michael Natterer 5a7c517574 app: improve the undo strings of the transform tools
Apply modified patch from Liam Quin which replaces the hardcoded
undo strings by dynamic ones returned by a new virtual function
of GimpTransformTool.
2011-08-27 08:37:30 +02:00
Mikael Magnusson bed3ca0ada app: fix right-click cancel after a reset in transformtool 2011-08-13 13:34:17 +02:00
Michael Natterer c2e6f24687 app: add GimpCanvasTransformGuides and use them in the transform tool
which removes a lot of code from the transform tool, and reduces the
number of canvas items used for the transform grid from possibly
gazillions to one.
2011-07-24 18:42:13 +02:00
Michael Natterer 43788feb50 app: remove enum GimpTransformGridType
and use the two new values from GimpGuidesType instead.
2011-07-24 18:01:21 +02:00
Michael Natterer df448eb171 app: GimpTransformTool: remove members handle_w and handle_h
Instead, return them from the private gimp_transform_tool_handles_recalc()
because they are only needed in the caller.
2011-06-26 23:37:32 +02:00