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)
Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.
Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().
Make some GUI places deal gracefully with palettes/colormaps with zero
entries.
(cherry picked from commit 37372555e5)
Small fix for the last commit: set a silly small initial size request
on the wrap_box so it doesn't initially request too much and breaks
dock layout deserialization.
(cherry picked from commit a2334b0b15)
gimp_container_grid_view_viewport_resized(): set the wrap_box'
required width to just one cell_width, not cell_width * columns. This
way it can shrink also when attached to a toolbox dock. It remains
unclear why it could nicely shrink in all other dock columns.
(cherry picked from commit 6a5e37b68d)
Shells can now travel from one window to another. Canvas position code
should therefore not keep track of the image window for a specific shell
but must use whatever is the current window for this shell (even though
it may be a different one before and after the size-allocate).
This also partly fixes some positioning issue during mode switch.
(cherry picked from commit 7e513faa50)
Small fix from commit 2697b29. This previous commit was working well, but
implied calling this method as many time as there are opened shells,
whereas once is enough.
(cherry picked from commit 8ef5fca062)
during an image rescale, while spinning the main-loop,
layer-groups preview generation used to start before their
layers were fully rescaled, so it tried to access tiles that
were not yet there
(cherry picked from commit 3cc923d5a5)
opening many images from the command line used to print:
(gimp-2.9:): GLib-GObject-CRITICAL **: g_object_add_weak_pointer:
assertion 'G_IS_OBJECT (object)' failed
because only the first finds the empty display
(cherry picked from commit 8a7d5c9d16)
GIMP's "exit" signal was emitted before the handler was connected.
Don't start loading command line images or batch processing before
app_exit_after_callback() is connected. Make sure we don't use
dangling main loop pointers or try to stop a non-running main loop.
(cherry picked from commit 09682d62ae)
...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)
pdb: Need to gimp_vectors_freeze()/thaw() around stroke modifications
so the vector's preview and the cached GimpBezierDesc are invalidated.
(cherry picked from commit 64887fe06c)
The previous code did not consider that a transformation
described by a matrix with non integer values in the 3rd
column or by a non affine matrix requires interpolation
and make floating point arithmetic rounding errors
consistent with INTERPOLATION_NONE
if the gradient itself isn't changed.
GimpData: implement GimpObject::name_changed() and set the "dirty"
flag to TRUE. Don't set dirty in GimpData::dirty()'s default impl
because that calls gimp_object_name_changed() anyway.
(cherry picked from commit 5280a02ed8)
When the accelerator is NULL, gtk_action_group_add_action_with_accel()
would use the default one for the stock icon used. And GTK_STOCK_CLOSE
default accelerator is "<Primary>w" which we already use for view-close.
We must use empty string when we want no default accelerator.
(cherry picked from commit 28669b07d1)
view-close was closing also toolbox docks if they had the focus. Now
this action will close only the current active image view (if any),
whatever the window which has actual focus.
Additionally all other view actions are available on dock focus.
(cherry picked from commit 2ad8634c06)
Remove the legacy <Toolbox>, <Load> and <Save> from the error message
that states which plug-in menu paths are valid, and add the missing
<Fonts> and <ToolPresets>. Also actually handle <ToolPresets>, this
was apparently forgotten.
(cherry picked from commit 564e6010fd)
and gimp-levels-tool.settings
Serialize the channel properties manually (not using
gimp_config_serialize_properties()), so the parent class' "time"
property doesn't end up in the config file once per channel.
(cherry picked from commit 6781439fdc)
Use "right-docks-width" and always a positive value instead of
"right-docks-position" (as opponsed to "left-docks-width", that
distinction is a GtkPaned implementation detail and does not belong
into a config file). Parse all old values too. Also fix a glitch in
the deserialization code which might fix bug #700147.
(cherry picked from commit a078ca3f5f)
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)
In multi-window mode, closing an image window is only meant to close
the current image (unless this is the last empty window).
In single window mode though, you are meaning to close the whole program.
Thanks to Niels Martignène for the original patch.
(cherry picked from commit 6008c2019b)
Make file_utils_uri_get_ext() public and use it instead of
strrchr(uri, '.'). Also add "xz" to the list of matched special cases,
and some cleanup.
(partial cherry pick from commit e99c0045a2)
If the selected item in a GimpContainerEntry is invalid, or else when the entry
is being updated, the text shows in red.
(cherry picked from commit 64fe3af1a9)
Don't try to switch to the move tool if the move tool is already active.
Also never bail out early from gimp_display_shell_space_pressed() so we
don't end up in an inconsistent state.
(cherry picked from commit 87584d2f82)
...one image onto another
gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.
gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
(cherry picked from commit bacc9c9635)
by adding a local "factory_context" variable instead of calling
gimp_dialog_factory_get_context (dock_window->p->dialog_factory)
multiple times.
(cherry picked from commit 076f375e78)
This is not a bugfix, just to seamlessly pick the next commit...
Don't pass a NULL pointer to gimp_text_buffer_get_font_tag() because
it is dereferenced in a call to strcmp().
gimp_context_get_font_name() returns NULL when the selected text
includes spans with different fonts. Add the same special handling for
spans with inconsistent sizes too, and add comments that we should
have the same for the color.
Original patch from Massimo Valentini.
(cherry picked from commit 804313bbec)
This should fix crashes in which tag objects got accessed after they
were disposed, because they still were stored with the popup object.
(cherry picked from commit b109e05806)