Commit 0055a2ad authored by Jehan's avatar Jehan

app: push a temporary status when picking layer with alt-midclick.

Though the layer list will also show updated, it is much easier to look
at the layer name in the status bar whose position never changes.
Anyway it makes sense to just show a temporary status info message
giving the picked layer name, making it all the easier to find the layer
you are looking for.

(cherry picked from commit 496bc02b)
parent a0361ec5
......@@ -67,7 +67,9 @@
#include "gimpdisplayshell-transform.h"
#include "gimpimagewindow.h"
#include "gimpmotionbuffer.h"
#include "gimpstatusbar.h"
#include "gimp-intl.h"
#include "gimp-log.h"
......@@ -1241,9 +1243,7 @@ gimp_display_shell_canvas_tool_events_internal (GtkWidget *canvas,
if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK)
/* We reset the picked layer only when hitting the Alt
* key.
/* Make sure the picked layer is reset. */
shell->picked_layer = NULL;
switch (kevent->keyval)
......@@ -1327,6 +1327,17 @@ gimp_display_shell_canvas_tool_events_internal (GtkWidget *canvas,
active_tool = tool_manager_get_active (gimp);
if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK &&
GimpStatusbar *statusbar;
statusbar = gimp_display_shell_get_statusbar (shell);
gimp_statusbar_pop_temp (statusbar);
shell->picked_layer = NULL;
if ((state & GDK_BUTTON1_MASK) &&
(! shell->space_release_pending ||
(kevent->keyval != GDK_KEY_space &&
......@@ -1581,7 +1592,17 @@ gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
if (layer && ! gimp_image_get_floating_selection (image))
if (layer != gimp_image_get_active_layer (image))
gimp_image_set_active_layer (image, layer);
GimpStatusbar *statusbar;
gimp_image_set_active_layer (image, layer);
statusbar = gimp_display_shell_get_statusbar (shell);
gimp_statusbar_push_temp (statusbar, GIMP_MESSAGE_INFO,
_("Layer picked: '%s'"),
gimp_object_get_name (layer));
shell->picked_layer = layer;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment