Commit 2c9a8a56 authored by Ell's avatar Ell

app: clear navigation editor when last image is closed

In GimpNavigationEditor, make sure to clear the editor's shell when
the last image is closed, even though the corresponding display is
stil alive, so that we don't needlessly extend the lifetime of the
image.  This is necessary after the recent GimpImageViewable
changes, since the editor now (indirectly) holds a reference on the
image.
parent 0745043d
Pipeline #113640 passed with stages
in 16 minutes and 58 seconds
......@@ -193,7 +193,7 @@ gimp_navigation_editor_display_changed (GimpContext *context,
{
GimpDisplayShell *shell = NULL;
if (display)
if (display && gimp_display_get_image (display))
shell = gimp_display_get_shell (display);
gimp_navigation_editor_set_shell (editor, shell);
......@@ -220,6 +220,13 @@ gimp_navigation_editor_set_context (GimpDocked *docked,
g_signal_connect (context, "display-changed",
G_CALLBACK (gimp_navigation_editor_display_changed),
editor);
/* make sure to also run gimp_navigation_editor_display_changed() when\
* the last image is closed, but its display doesn't, so that the editor
* is properly cleared.
*/
g_signal_connect (context, "image-changed",
G_CALLBACK (gimp_navigation_editor_display_changed),
editor);
display = gimp_context_get_display (context);
}
......
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