Commit d48936b9 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

don't try to reorder dockables in a dock containing exactly one dockable

2003-03-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): don't
	try to reorder dockables in a dock containing exactly one dockable
	(fixes bug #109042)
parent c40a6f99
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): don't
try to reorder dockables in a dock containing exactly one dockable
(fixes bug #109042)
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/paint/paint-enums.[ch]: register GimpPaintApplicationMode
......@@ -565,6 +565,25 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
else if (index == 2)
index = -1;
/* if dropping to the same dock, take care that we don't try
* to reorder the *only* dockable in the dock
*/
if (src_dockable->dockbook->dock == dock)
{
gint n_books;
gint n_dockables;
n_books = g_list_length (dock->dockbooks);
children =
gtk_container_get_children (GTK_CONTAINER (src_dockable->dockbook));
n_dockables = g_list_length (children);
g_list_free (children);
if (n_books == 1 && n_dockables == 1)
return TRUE; /* successfully do nothing */
}
g_object_ref (src_dockable);
gimp_dockbook_remove (src_dockable->dockbook, src_dockable);
......
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