Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GIMP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,766
Issues
2,766
List
Boards
Labels
Service Desk
Milestones
Merge Requests
40
Merge Requests
40
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GIMP
Commits
02fa3542
Commit
02fa3542
authored
Feb 21, 2021
by
Jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: replace more gimp_(s|g)et_active_layer() to *_selected_layers().
parent
579cfc06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
17 deletions
+21
-17
app/actions/text-tool-actions.c
app/actions/text-tool-actions.c
+4
-4
app/core/gimpfloatingselectionundo.c
app/core/gimpfloatingselectionundo.c
+5
-1
app/core/gimplayer-floating-selection.c
app/core/gimplayer-floating-selection.c
+9
-11
app/display/gimpdisplayshell-tool-events.c
app/display/gimpdisplayshell-tool-events.c
+3
-1
No files found.
app/actions/text-tool-actions.c
View file @
02fa3542
...
...
@@ -161,7 +161,7 @@ text_tool_actions_update (GimpActionGroup *group,
GimpTextTool
*
text_tool
=
GIMP_TEXT_TOOL
(
data
);
GimpDisplay
*
display
=
GIMP_TOOL
(
text_tool
)
->
display
;
GimpImage
*
image
=
gimp_display_get_image
(
display
);
G
impLayer
*
layer
;
G
List
*
layers
;
GimpVectors
*
vectors
;
GimpDisplayShell
*
shell
;
GtkClipboard
*
clipboard
;
...
...
@@ -171,10 +171,10 @@ text_tool_actions_update (GimpActionGroup *group,
GimpTextDirection
direction
;
gint
i
;
layer
=
gimp_image_get_active_layer
(
image
);
layer
s
=
gimp_image_get_selected_layers
(
image
);
if
(
layer
)
text_layer
=
gimp_item_is_text_layer
(
GIMP_ITEM
(
layer
));
if
(
g_list_length
(
layers
)
==
1
)
text_layer
=
gimp_item_is_text_layer
(
GIMP_ITEM
(
layer
s
->
data
));
vectors
=
gimp_image_get_active_vectors
(
image
);
...
...
app/core/gimpfloatingselectionundo.c
View file @
02fa3542
...
...
@@ -101,12 +101,16 @@ gimp_floating_selection_undo_pop (GimpUndo *undo,
case
GIMP_UNDO_FS_TO_LAYER
:
if
(
undo_mode
==
GIMP_UNDO_MODE_UNDO
)
{
GList
*
layers
;
/* Update the preview for the floating selection */
gimp_viewable_invalidate_preview
(
GIMP_VIEWABLE
(
floating_layer
));
gimp_layer_set_floating_sel_drawable
(
floating_layer
,
floating_sel_undo
->
drawable
);
gimp_image_set_active_layer
(
undo
->
image
,
floating_layer
);
layers
=
g_list_prepend
(
NULL
,
floating_layer
);
gimp_image_set_selected_layers
(
undo
->
image
,
layers
);
g_list_free
(
layers
);
gimp_drawable_attach_floating_sel
(
gimp_layer_get_floating_sel_drawable
(
floating_layer
),
floating_layer
);
...
...
app/core/gimplayer-floating-selection.c
View file @
02fa3542
...
...
@@ -217,6 +217,7 @@ floating_sel_activate_drawable (GimpLayer *layer)
{
GimpImage
*
image
;
GimpDrawable
*
drawable
;
GList
*
selected_drawables
;
g_return_if_fail
(
GIMP_IS_LAYER
(
layer
));
g_return_if_fail
(
gimp_layer_is_floating_sel
(
layer
));
...
...
@@ -230,24 +231,21 @@ floating_sel_activate_drawable (GimpLayer *layer)
{
GimpLayerMask
*
mask
=
GIMP_LAYER_MASK
(
drawable
);
gimp_image_set_active_layer
(
image
,
gimp_layer_mask_get_layer
(
mask
));
selected_drawables
=
g_list_prepend
(
NULL
,
gimp_layer_mask_get_layer
(
mask
));
gimp_image_set_selected_layers
(
image
,
selected_drawables
);
}
else
if
(
GIMP_IS_CHANNEL
(
drawable
))
{
GList
*
channels
=
g_list_prepend
(
NULL
,
drawable
);
gimp_image_set_selected_channels
(
image
,
channels
);
g_list_free
(
channels
);
selected_drawables
=
g_list_prepend
(
NULL
,
drawable
);
gimp_image_set_selected_channels
(
image
,
selected_drawables
);
}
else
{
GList
*
layers
=
g_list_prepend
(
NULL
,
drawable
);
gimp_image_set_selected_layers
(
image
,
layers
);
g_list_free
(
layers
);
selected_drawables
=
g_list_prepend
(
NULL
,
drawable
);
gimp_image_set_selected_layers
(
image
,
selected_drawables
);
}
g_list_free
(
selected_drawables
);
}
const
GimpBoundSeg
*
...
...
app/display/gimpdisplayshell-tool-events.c
View file @
02fa3542
...
...
@@ -1560,7 +1560,9 @@ gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
{
GimpStatusbar
*
statusbar
;
gimp_image_set_active_layer
(
image
,
layer
);
layers
=
g_list_prepend
(
NULL
,
layer
);
gimp_image_set_selected_layers
(
image
,
layers
);
g_list_free
(
layers
);
statusbar
=
gimp_display_shell_get_statusbar
(
shell
);
gimp_statusbar_push_temp
(
statusbar
,
GIMP_MESSAGE_INFO
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment