app: gimp_session_info_dockable_restore(): don't return existing singletons

Instead, return NULL. The singleton dockable can't be restored in this
dock because it's already open in another dock.
This commit is contained in:
Michael Natterer 2011-05-12 20:24:32 +02:00
parent f37394cd0f
commit 80cf95319e
1 changed files with 7 additions and 0 deletions

View File

@ -290,6 +290,13 @@ gimp_session_info_dockable_restore (GimpSessionInfoDockable *info,
if (dockable)
{
/* gimp_dialog_factory_dockable_new() might return an already
* existing singleton dockable, return NULL so our caller won't
* try to add it to another dockbook
*/
if (gimp_dockable_get_dockbook (GIMP_DOCKABLE (dockable)))
return NULL;
gimp_dockable_set_locked (GIMP_DOCKABLE (dockable), info->locked);
gimp_dockable_set_tab_style (GIMP_DOCKABLE (dockable), info->tab_style);