Commit Graph

311 Commits

Author SHA1 Message Date
909ecd4e79 Bug 757905 - using select tool on image in one tab causes user to lose...
...selection on image in another tab

Fixed for rectangle select, ellipse select and crop, they now all
confirm the previous display's tool interaction instead of aborting it
when the tool is used on another display.
2015-11-20 20:51:23 +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
bda1cd049d Bug 735516 - Crop to content fails
Return a new enum GimpAutoShrink { SHRINK, EMPTY, UNSHRINKABLE } from
gimp_pickable_auto_shrink() because a simply boolean FALSE doesn't
distinguish between "not further shrinkable" and "no content". Change
the callers accordingly add a special "already cropped" message where
we only had a "no content" message before.
2014-08-31 17:41:54 +02:00
125cf2a2a3 app: use the image instead of the projection for accessing a pickable 2013-09-13 23:29:06 +02:00
4a5a6ef914 Bug 684330 - Rectangle tool's "fixed size" option is off-by-one
ROUND() is consistent only on positive values, and bad rounding
creates an offset when negative values are involved. Introduce
SIGNED_ROUND() and use it in gimprectangletool.c. It should probably
be used in much more places.
2013-02-13 00:08:39 +01:00
6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
c1811d6bdf app: gimp_image_crop_auto_shrink() -> gimp_pickable_auto_shrink()
It was in gimpimag-crop only for historic reasons. Clean up API
and code to do simpler and more reasonable stuff.
2012-09-22 14:56:52 +02:00
b26216f1d3 app: gimp_rectangle_tool_auto_shrink(): honor the drawable's offset 2012-01-14 21:28:34 +01:00
915da4517d Bug 666853 - Auto shrink selection doesn't work 2012-01-11 21:12:58 +01:00
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
da2410148c Revert "app: initalize rectangle tool respecting size constrants"
This reverts commit ef7060251c.
2011-10-06 20:16:26 +03:00
970782cfef Revert "app: prevent executing rectangle tool on the creating click"
This reverts commit 5a99bf4f47.
2011-10-06 20:16:26 +03:00
c8cde40952 Revert "app: handle motion right just created size fixed rects"
This reverts commit c8fa2c99e8.
2011-10-06 20:16:26 +03:00
3ad505b124 Revert "app: rect tool changes made for suppressed execute need to be applied"
This reverts commit eff20af915.
2011-10-06 20:16:25 +03:00
ad3633110a app: Remove duplicate assignment 2011-10-06 08:37:41 +05:30
eff20af915 app: rect tool changes made for suppressed execute need to be applied 2011-10-01 17:07:51 +03:00
c8fa2c99e8 app: handle motion right just created size fixed rects 2011-10-01 15:03:16 +03:00
5a99bf4f47 app: prevent executing rectangle tool on the creating click 2011-10-01 15:03:16 +03:00
ef7060251c app: initalize rectangle tool respecting size constrants 2011-10-01 12:38:04 +03:00
4e6f43a890 app: add new item class GimpCanvasRectangleGuides and use it
Removes a lot of code from the rectangle tool and fixes off-by-one
drawing problems because in image coordinates, lines can't be aligned
correctly with rectangles.
2011-05-22 22:09:09 +02:00
6b34f79e51 app: gimp_rectangle_tool_draw(): lose "pub_" from local rectangle variables
to improve readability.
2011-05-22 17:54:29 +02:00
2f51c8afd4 app: GimpRectangleToolPrivate: don't keep a copy of the guides type around
It was needed only for XOR drawing.
2011-05-20 19:48:11 +02:00
0dcdfe9e80 app: move enum GimpRectangleGuide from tools/ to display/
and rename it to enum GimpGuidesType.
2011-05-20 19:41:48 +02:00
da380504bf app: don't call gimp_tool_control_halt() in gimp_rectangle_tool_halt()
It's not the rectangle tool's business to manage press/motion/release
cycles. Fixes warnings in the crop tool.
2011-05-20 19:15:31 +02:00
3e51484b18 app: fix off-by-one x2,y2 in gimp_rectangle_tool_draw_guides()
the 1.0 was subtracted explicitly, I have no clue why but the reason
for it is obviously gone.
2011-05-17 23:18:19 +02:00
c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
0db785c36a app: don't call control_activate()/control_halt() in GimpRectangleTool
Instead, call it in all implementors.
2011-03-30 22:13:31 +02:00
074e2c088a app: GimpRectangleTool: Rounding error when moving/resizing with keyboard
Fix for bug #653186: When a rectangle selection is created or moved by
mouse at certain zoom-levels (200%, 400%, 800%), its coordinates can
become exactly .500. By then using the keyboard to move/resize in
steps of one pixel, a rounding error occurs in
gimp_rectangle_tool_update_int_rect(). This leads to the coordinate
either not beeing changed at all or changed by 2 pixels at a time. The
patch changes the function from using RINT() to ROUND() for the
calculations, which prevents the rounding error from happening.
2011-03-30 19:45:46 +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
cc04620b96 Adjust Bug 559716 bugfix to not test exact double equality 2011-03-21 16:53:35 +01:00
ec1108d62a Bug 559716 - Changing crop size in Crop Tool Options can make UI unresponsive
In gimp_rectangle_tool_update_options(), freeze()/thaw() notifications
around setting setting x, y, width, height, so all values are
up-to-date when "notify" is emitted. Also, only set the values that
have actually changed so we don't process notifications when no change
was done.
2011-03-21 14:38:26 +01:00
70f88c4320 app: don't update the highlight when the rectangle tool is resumed
It causes an infinite invalidation loop.
2011-01-27 21:36:58 +01:00
d46b53f63d Bug 635040 - Edit -> Stroke Path performs no action on an incomplete path
Add error reporting to gimp_drawable_stroke_vectors() and produce the
same warning as the paint core when trying to stroke a path with zero
or one points only.
2010-11-25 11:31:40 +01:00
3f6a70f7fe app: define one more standard tool handle size 2010-11-08 22:48:50 +01:00
73d2f44210 app: Add some GimpRectangleTool GIMP_LOG() messages 2010-10-26 14:23:08 +02:00
22db39afd2 app: fix incomplete earlier s/GtkAnchorType/GimpHandleAnchor/ change 2010-10-18 20:13:09 +02:00
b693269060 app: simplify creating of stroke and fill groups a lot
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
  of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
  of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
  gimp_draw_tool_add_stroke_group() and fill_group()

Unrelated:

- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
  avoid ugly overdrawing (the mis-alignment of arcs becomes
  very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
33ab94517f app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
and use it in all tools which have groups.
2010-10-01 14:24:46 +02:00
201bfe3e25 app: add a "shell" property to GimpCanvasItem
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
6ec1729035 app: add the handle that is being dragged to the stroke group too 2010-09-26 17:13:53 +02:00
9cce1b894b app: put a lot of rectangle tool lines into a stroke groups
so they don't overlap.
2010-09-26 16:17:05 +02:00
b3af235e79 app: rename all gimp_draw_tool_draw_foo() functions
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
db1da1ed64 app: handle sizes should be odd numbers 2010-09-24 13:13:53 +02:00
75c11e259d app: fix off-by-one in rectangle tool guides
and draw the guides below the rectangle.
2010-09-24 11:21:07 +02:00
4d0c750327 app: get rid of "gboolean use_offsets" in the draw tool
and always pass image coordinates. Transform the coords manually in
the very few places which passed TRUE.
2010-09-23 19:23:27 +02:00
0c1073460c app: get rid of some public draw tool API
and use gimp_draw_tool_draw_handle() instead which does exactly the
same for these cases.
2010-09-20 00:13:32 +02:00
c4588f1209 Bug 575911 - Add 'Rule of fifths' crop guide overlay
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
f214b4f9b7 app: oper_update(): if we are not in proximity, set the function to DEAD
so all hovering is undrawn. oper_update() is called with proximity ==
FALSE when the pointer leaves the canvas, either to the outside or
into an overlay widget, so this is exactly the right thing to do (and
is probably missing from a lot of other tools too).
2010-03-01 23:34:52 +01:00
e57b0eee63 Don't call gimp_display_get_image() on a NULL display 2009-10-07 19:46:01 +02:00
08f35de4ac Use gimp_display_get_image() instead of display->image 2009-10-07 19:00:42 +02:00