In 85d381bd, we fixed pass through layer groups to match
the size of the group render, allowing for filter effects to
be applied on all layers below.
This patch extends that fix to layer masks created on pass
through layer groups. This allows you to create a mask and
then selectively hide/show effects on the layer below,
like a maskable adjustment layer.
The previous commit was not taking into account usages of
gimp_cairo_surface_create_buffer(), other than the text layer rendering
usage, as it was focused on fixing #14970.
In particular, in other pieces of code, we were using a temporary
GeglBuffer as a way to edit the original Cairo surface but the syncing
back was not happening anymore. So previous commit was breaking all
thumbnails of layers or images, as well as PDF export for all raster
layers.
After some thought, I decided to implement a new function
gimp_cairo_surface_get_buffer() which would do what
gimp_cairo_surface_create_buffer() was doing, but adding a boolean flag
to declare whether or not we were expecting to sync back into the Cairo
surface's data. After all, when we don't need to sync back, better avoid
the useless work of copying possibly huge data.
I also added back the possibility of returning a linear-memory backed
buffer, after some discussion with pippin. Because for very small
surfaces, and if we are indeed looking to sync back into the source
Cairo surface, the advantages of using a linear buffer may still be
worth it, even though it's not true for the general case (where tiled
buffers will be much more efficient). I used 4096 (64^2 because our
current tile dimensions are 64 right now in GIMP), though this number is
kinda random and doesn't matter too much (it doesn't have to be the
square of the tile's width or height). I don't put any info about this
in the new function's documentation because developers should not have
any expectations on the type of buffer they get (only whether or not it
will sync back to the source).
As a consequence of all this, gimp_cairo_surface_create_buffer() has
been deprecated as of GIMP 3.2, though it will still work the same. The
new function will be recommended as a replacement.
Creating a gegl buffer from some data (e.g. cairo surface) through gegl_buffer_linear_new_from_data
causes crashes if the cairo surface is too big, because the gegl buffer will have only one huge tile
so tile_size will overflow if surface size > INT_MAX. Using the appropriate api, gegl will calculate
tile size and create the needed tiles automatically.
Previously, changing the color via the GimpFillEditor color button
immediately pushed each intermediate value into the color history,
polluting it with transient previews. Only the final choice
confirmed by the user should be recorded.
Now the color is recorded in the history only when the user explicitly
confirms the selection (e.g. OK/Apply), preventing noisy
history entries while preserving the expected behavior when a color
is accepted.
core: add spaces to fix alignment
Instead of deleting all selected paths except
for those attached to vector layers, we
stop the action and notify the user that
they can not delete paths attached to
vector layers.
In gimp_item_tree_view_blink_item (), we
originally used "3" because that is the
item column in the layer and channel
dockables. However, the path dockable
item column is at "2" since it lacks a
filter column.
To make this more general, Jehan
suggested we create a
gimp_container_tree_view_get_main_column_position ()
function in GimpContainerTreeView that
finds and returns the column index of
the main item. Then, we use that function
in gimp_item_tree_view_blink_item ().
Signature for "match-selected" signal on GtkEntryCompletion was wrong,
and code didn't handle the case of multiple resouces sharing the same
name. (e.g. 2 different fonts both named "Holiday").
Resolves#4275
Text layers should have transparency when they are
not rasterized. It is possible to remove the alpha channel
when a text layer is rasterized, which causes a CRITICAL
when gimp_text_layer_render () runs to re-render the
vector-based text layer when the rasterization is reverted.
This patch adds a check in the set_rasterized () function to
verify the text layer still has an alpha channel when it's being
converted back to a vector-based layer. If the alpha channel
was removed, it is restored before re-rendering.
As of GLib 2.86.1-1, GFileMonitors created with the
G_FILE_MONITOR_WATCH_HARD_LINKS
flag are not monitored on Windows.
This means that link layers will not
automatically update when the external
source is edited.
We will temporarily use the
G_FILE_MONITOR_NONE flag on Windows
until this is resolved
This reverts commit 2ba6725761.
This too is wrong. First it mentions "visible-vertical" and
"visible-horizontal" properties of GtkAction, but this is not it! Two
similarly named properties are also on GtkToolItem and these are not
deprecated! Looking at the code, tool_button is a GimpToolButton, whose
parenting indeed goes up to GtkToolItem (and that's obviously not an
action anyway).
Secondly, it creates other bugs, in particular I now sometimes have a
completely empty toolbox. That's clearly wrong.
Reverting for now. Issue #9813 will have to be fixed differently.
This reverts commit ee421da346.
This is wrong. This case should not happen, or if it does, this is very
likely not the proper fix. In fact, it was trying to fix a bug created
in commit 2ba6725761 which is also wrong (and which I'm going to revert
next).
See also my comment in Gitlab:
ee421da346 (note_2596612)
Resolves#15221
Unlike most of our plug-ins, Animation Playback
and ImageMap use GtkWindows so they're
not wired to close when the user presses
Escape.
To standardize this with other plug-ins,
this patch adds an entry for Escape in the
existing ImageMap key-press-event function
and adds this functions to Animation Playback.
This patch also fixes a crash in Animation Playback
that occurs if you use the arrow keys to
move the frame slider to the left when
you're at 0, due to it trying to pass an index
of -1 to the frame array.
Since GimpProcedureDialog automatically adds labels
to GimpChoice parameters when they're displayed in the
GUI, we don't need to add "Red", "Green", or "Blue" labels
to the frames that contain the radio buttons like we did in
2.10.
"visible-vertical" and "visible-horizontal" attributes
of GtkActions were deprecated in GTK 3.10, and since
the GAction port, we don't set them anyway on actions.
This seems to have impacted the ability to toggle a toolbutton's
visibility when a toolitem's "show" property is changed.
This patch replaced the deprecated "visibile-vertical" and
"visible-vertical" properties with a single "visible" property,
which consistently updates when the eye icon is toggled in
GimpToolEditor.
Closes#15226
When you previously exported a dds with the pre-existing mipmaps,
that will be the option selected in the export dialog the next time.
If, however, that next time there were an incorrect number of mipmaps
available, the option was grayed out, but selected. Exporting then
caused a crash due to less mipmap layers being available than expected.
When writing the dds settings we need to update that setting in our
config object, so that's what we add here. Also remove updating the
local variable since that will not be used anymore in this function.
Resolves#9285
In images_delete_image_cmd_callback (), we dereference
images which we want to delete. This works for images created
via the GUI. However, images created via PDB scripts are not
automatically connected to the display if created with no layers.
If you try to delete them, they will be dereferenced but will still
in the ImageView dockable. This can cause a crash if you try to
access the container again, since it will point to an unreferenced
variable.
This patch removes the image from the container first before
dereferencing it, to prevent the crash.