Commit graph

3633 commits

Author SHA1 Message Date
Michael Natterer
60bf4e367d Bug 700193 - undoing paint tools doesn't update last_coords properly
paint_core->start_coords is in fact the last stroke's endpoint and
only used for storing it in GimpPaintCoreUndo, so the last endpoint
can be resotred for straight-line painting after an undo. Make the
code actually doing that.

(cherry picked from commit d1795ac204)
2013-07-15 00:45:12 +02:00
Michael Natterer
ef649f4827 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.

(cherry picked from commit 2e8ef97c13)
2013-06-18 19:08:08 +02:00
Jehan
a98b6581e6 Bug 699185 - when moving the pointer fast out of guide scope, do not keep it highlighted.
When a drawing timeout happens too close from the previous drawing, we don't want to cancel
the timeout function (FALSE), but simply retry later (TRUE).

In our case in particular, if you move your pointer very fast over a guide, the highlighting
drawing was happening less than MINIMUM_DRAW_INTERVAL before the un-highlighting drawing,
hence canceling the later, which caused the drawing bug.
(cherry picked from commit 3496e178ef)
2013-05-12 05:25:49 +09:00
Mikael Magnusson
900cc4108b app: forgot to invert the matrix in corrective mode when transforming the selection. 2013-04-23 17:17:08 +02:00
Michael Natterer
c110220793 Bug 693978 - GIMP crashes after changing text preset
Applying a preset overwrites all the tool option's properties, also
temporarily its name. This name change gets auto-synced with the
option's text proxy object which also inherits from GimpObject and has
a name. Make sure we don't queue that name change for being applied to
the text layer's text object, because that code only handles
properties of GimpText itself.
(cherry picked from commit 931ea102f8)
2013-02-16 20:43:49 +01:00
Téo Mazars
de883b25a6 Bug 688068 - Rect selection: "Fixed: Aspect Ratio" doesn't work when...
Use current aspect when creating rectangle tool from a selection.
(cherry picked from commit f6e64b9ed9)
2013-02-13 00:39:15 +01:00
Téo Mazars
606532f5a8 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.
(cherry picked from commit 4a5a6ef914)
2013-02-13 00:27:36 +01:00
Michael Natterer
205c64d1b8 Bug 688746 - Select tool Alt+Shift and Alt+Ctrl dragging modifies...
Check for layer groups and locked layers in gimp_selection_tool_start_edit()
and show the usual warning instead of allowing the forbidden operation.
(cherry picked from commit 593ddb741f)
2012-12-14 23:04:31 +01:00
Michael Natterer
2a77d536aa app: make Tab, Shift+Tab and Escape move the focus back to text editing
when it was in the floating text style editor. While this doesn't fix
anything by itself, it enables fixing text style setting to behave
reasonably when there is no selection.
(cherry picked from commit 76b05c2afc)
2012-11-09 22:15:25 +01:00
Michael Natterer
901f396a5e Bug 687851 - Gimp crashes on Colors > Desaturate
Don't install the frame rate limiting draw timeout when resuming a
draw tool that is not active, so accidential timeout installation from
whatever tool dispose code can't happen.
(cherry picked from commit 6a33951aa6)
2012-11-07 23:24:00 +01:00
Michael Natterer
cfacd4f5a6 Bug 687375 - Text tool: unnecessarily insists on having a layer before working
There is no reason to disallow the text tool from working on a
previously empty image, so allow it.
(cherry picked from commit eba022f01b)
2012-11-06 22:23:36 +01:00
Massimo Valentini
66b4aa2d34 Bug 684483 - Text tool: crash after double clicking text
It seems that when the undo action reverts a text -> mark-up change
(or v.v.)  the notifications are inverted, first is emitted the new
value notification and successively the property becoming NULL. The
result is that gimp_text_buffer_set_{text,mark-up} is called last with
NULL, unsetting both text_buffer text and mark-up.

The right way to do it is to always prefer "markup" over "text" if
markup is present, no matter if the notification was for "markup" or
"text".
(cherry picked from commit 9b58e2ba0c)
2012-10-22 15:42:43 +02:00
Michael Natterer
bc2b0d117d Bug 686523 - Text tool: text editor not shown on empty text box
gimp_text_tool_options_notify(): always show the editor, also when no
text object exists yet. There was no reason for this limitation.
(cherry picked from commit 2b3e5ebd78)
2012-10-21 23:32:17 +02:00
Michael Natterer
cd6fa1d9c9 Bug 663582 - Brush outline is too slow
Even less drawing: let the timeout running if it triggers within the
50ms since the last drawing, so it's reduced to its actual purpose of
updating to the actual cursor position after framerate-limiter skipped
drawing.
(cherry picked from commit 52d933a1cc)
2012-10-06 16:42:14 +02:00
Michael Natterer
55792c2f30 Bug 663582 - Brush outline is too slow
One more try: merge the spirit of Alexia's patch, but don't disable
the timeout, only make sure the minimum fps is also applied when
drawing is triggered by gimp_draw_tool_resume().
(cherry picked from commit 4218d9342f)
2012-10-06 00:29:59 +02:00
Michael Natterer
8d6634c8eb Bug 663582 - Brush outline is too slow
Don't confuse microseconds with milliseconds: the 20 fps interval
is 50000, not 50, sigh.
(cherry picked from commit db5c952c4e)
2012-10-06 00:05:54 +02:00
Michael Natterer
b03591e405 Bug 663582 - Brush outline is too slow
Keep around the last drawing time in GimpDrawTool and make sure we
draw at least with a frame rate of around 20 fps, which feels
reasonably non-laggy.
(cherry picked from commit fd4e220c28)
2012-10-04 20:44:58 +02:00
Michael Natterer
61aa1ea510 Bug 683791 - Free select tool constraint key
Fix condition that constrains angles to 15°, its bracketing was wrong.
(cherry picked from commit 9b927ba0cd)
2012-09-14 11:06:21 +02:00
Michael Natterer
991d42c85e Bug 683553 - Spinscale scrollvalues in Brushsize are much too smal
Set the step/page increments to 1.0/10.0 for brush size and to 0.1/1.0
for aspect ratio. the previous values were way too small.
(cherry picked from commit 2c3a046d83)
2012-09-11 20:31:19 +02:00
Michael Natterer
f3a4200e72 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.
(cherry picked from commit e546f2b43b)
2012-09-07 00:00:24 +02:00
Michael Natterer
d6091dbce6 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.
(cherry picked from commit 078128bb09)
2012-07-26 18:19:41 +02:00
Massimo Valentini
5d2933c51c app: don't pass a NULL widget to gtk_widget_event
<Alt>C C <Ctrl>1 <ESC> used to print:

(gimp-2.8:1): Gtk-CRITICAL **: IA__gtk_widget_event:
                assertion `GTK_IS_WIDGET (widget)' failed
2012-07-05 18:08:01 +02:00
Michael Natterer
74c20f2222 Bug 676585 - Gimp crashes when writing in Arabic and clicking right arrow
Check for pango_layout_move_cursor_visually() returning a new index of
G_MAXINT, which indicates that we moved beyond the end of the layout,
and do nothing instead of trying to access the memory there.
(cherry picked from commit 7d280abd9a)
2012-05-23 09:47:29 +02:00
Michael Natterer
4fdb1ec90a Bug 676279 - Ctrl or Shift causes selection tools to reset...
Make sure to not override the logic that separates the tool option's
selection mode from the one determined by modifiers, by blindly
calling gimp_modifiers_to_channel_op(state) on a zero state.
(cherry picked from commit 2d882dd64f)
2012-05-17 23:35:05 +02:00
Michael Muré
cb2de50697 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:42:53 +09:00
Michael Muré
f8bcdcb9a5 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:04:49 +09:00
Michael Natterer
7ef8a96465 app: don't call gimp_image_flush() when cancelling GimpImageMapTool
because the tool might be cancelled from some other place opening an
undo group, so flushing the image would update menus and whatnot while
that other operation is running, with unforeseeable side
effects. Also, flusing the image here is not needed because we didn't
change anything in the image. Instead, make sure manually that the
display is updated correctly after restoring GimpImageMapTool's
temporary editing.
(cherry picked from commit e7e8c9ef0a)
2012-05-05 21:48:13 +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
Øyvind Kolås
17f92b7379 app: the destroy functions are gone from GEGL, use g_object_unref() instead 2012-03-29 22:21:05 +01:00
Øyvind Kolås
eea7a40dbc app: update GeglOps to new GEGL API 2012-03-29 19:22:22 +01:00
Michael Natterer
439f7f579a app: s/Babl/const Babl/ 2012-03-24 18:52:31 +01:00
Massimo Valentini
6600bb8347 app: silence a harmless critical warning
Executing Desaturate... or Posterize... used to print:

Gimp-Widgets-CRITICAL **: gimp_settings_box_add_current: assertion
`GIMP_IS_SETTINGS_BOX (box)' failed
2012-03-18 18:30:28 +01:00
Michael Natterer
b262c93048 app: create an own GimpOperationBrightnessContrast
and use it instead of gegl:brightness-contrast because the GEGL op is
giving different reaults.
2012-03-13 15:02:17 +01:00
Michael Natterer
aa7e7c153c app: remove another bunch of one-line GtkTables 2012-03-12 20:12:11 +01:00
Michael Natterer
5e94863c8e app: get rid of a GtkTable in gimp_paint_options_gui(), and some cleanup 2012-03-09 20:30:05 +01:00
Massimo Valentini
7fed1b6e93 Bug 651956: Text tool misremembers point size upon reloading file
When setting the unit of a property shared with a gimp_prop_size_entry,
a conversion is applied to the corresponding size property (to preserve
size_entry's ref-value), but the conversion risks to change the size
property already updated.

To update, at the same time, size and unit, it is better to start updating
size_entry's unit in order to trigger the useless conversion on the stale
size.
2012-03-09 19:21:44 +01:00
Michael Natterer
fbd746f95a app: don't rely on gtk_container_remove() to always destroy the child
Instead, either destroy the child instead of removing it, or remove
*and* destroy it in cases where the remove() api on the "parent"
doesn't match GTK+'s parent/child relation (like with all our dock
widgets). We can't rely on remove() to implicitly detstroy, because
there might be arbitrary other code holding references, such as
accessibility modules and whatnot. Most likely fixes unclear crashes
in accessibility code and other crashes we blamed GTK+ for.
2012-02-21 00:36:18 +01:00
Michael Natterer
7f5a43f3e1 app: rename GimpToolInfo::menu_path to ::menu_label
"path" is a really ancient pre-GtkAction terminology here.
2012-02-14 10:00:26 +01:00
Michael Natterer
f2fc342101 Bug 670024 - Zoom Tool menu label is not translated
Remove the message context from the zoom tool's menu label. It's not
needed and can't work like that for menu items.
2012-02-14 09:54:29 +01:00
Massimo Valentini
b994280473 Bug 668814: Cannot move cursor right in on canvas editor
One possible way to decrease the incompatibilities
between letter spacing in a tagged gtk_text_buffer
and in an equivalent pango_layout

Remove also a valgrind reported invalid write in
gimptextbuffer.c
2012-02-09 12:36:43 +01:00
Michael Natterer
2414301799 Review the last few commits and apply some style fanaticism
some completely unrelated,
2012-02-07 20:36:55 +01:00
Massimo Valentini
05aa83270d Bug 554359: text tool should compress undo steps...
when the rectangle is manipulated
2012-02-07 17:32:02 +01:00
Massimo Valentini
39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer
0a68527edc app: move the GimpWindowStrategy interface from display/ to widgets/ 2012-01-30 23:33:21 +01:00
Michael Natterer
325bce54a7 app: port dockable showing to using GimpWindowStrategy API
so it works right in SWM. Fixed actions/, tools/, and app/ for now.
2012-01-30 23:24:44 +01:00
Michael Natterer
a77809a13b Bug 668447 - Rotate tool: wrong keyboard bindings to rotate image interactively
Make "Right" rotate right and "Left" rotate left.
2012-01-22 20:47:25 +01:00
Michael Natterer
b26216f1d3 app: gimp_rectangle_tool_auto_shrink(): honor the drawable's offset 2012-01-14 21:28:34 +01:00
Alexis Wilhelm
915da4517d Bug 666853 - Auto shrink selection doesn't work 2012-01-11 21:12:58 +01:00
Martin Nordholts
64d2dc122a app: Add and use gimp_dialog_factory_find_widget() 2012-01-10 19:47:52 +01:00
Michael Natterer
c34239c0bb Bug 667367 - Bad widget hint
Remove the tooltip of GimpTransformOptions:constrain from the param
spec and add it manually, so it is different for rotate and scale.
2012-01-07 22:18:22 +01:00