Issue #10441: encoding conversion popup when changing from SWM to MWM.
This commit is contained in:
parent
77712347d1
commit
98ebe96c1f
2 changed files with 27 additions and 1 deletions
|
|
@ -381,6 +381,7 @@ void
|
|||
image_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
gboolean is_indexed = FALSE;
|
||||
gboolean is_u8_gamma = FALSE;
|
||||
|
|
@ -394,6 +395,12 @@ image_actions_update (GimpActionGroup *group,
|
|||
gboolean profile = FALSE;
|
||||
gboolean s_bpc = FALSE;
|
||||
|
||||
if (gimp)
|
||||
{
|
||||
GimpContext *context = gimp_get_user_context (gimp);
|
||||
|
||||
g_return_if_fail (context && image == gimp_context_get_image (context));
|
||||
}
|
||||
#define SET_LABEL(action,label) \
|
||||
gimp_action_group_set_action_label (group, action, (label))
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
|
|
|
|||
|
|
@ -1986,10 +1986,29 @@ gimp_image_window_hide_tooltip (GimpUIManager *manager,
|
|||
static gboolean
|
||||
gimp_image_window_update_ui_manager_idle (GimpImageWindow *window)
|
||||
{
|
||||
GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
|
||||
GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
|
||||
GimpImage *active_image = NULL;
|
||||
GimpContext *context;
|
||||
|
||||
gimp_assert (private->active_shell != NULL);
|
||||
|
||||
context = gimp_get_user_context (private->active_shell->display->gimp);
|
||||
|
||||
if (context)
|
||||
active_image = gimp_context_get_image (context);
|
||||
|
||||
/* Since we are running idle, it is possible this runs after the
|
||||
* active display switched, and therefore we may call the wrong
|
||||
* actions for an image. See #10441.
|
||||
*/
|
||||
if ((active_image &&
|
||||
(! private->active_shell->display || ! gimp_display_get_image (private->active_shell->display))) ||
|
||||
active_image != gimp_display_get_image (private->active_shell->display))
|
||||
{
|
||||
private->update_ui_manager_idle_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
gimp_ui_manager_update (menus_get_image_manager_singleton (private->active_shell->display->gimp),
|
||||
private->active_shell->display);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue