Commit 64e506a0 authored by Michael Natterer's avatar Michael Natterer 😴

app: test-ui.c: use gimp_channel_is_empty() to check for a selection

parent 731cfc75
......@@ -364,11 +364,9 @@ alt_click_is_layer_to_selection (gconstpointer data)
gtk_tree_view = gtk_test_find_widget (dockable,
"Lock:",
GTK_TYPE_TREE_VIEW);
/* First make sure there is no selection */
g_assert (! gimp_channel_bounds (selection,
NULL, NULL, /*x1, y1*/
NULL, NULL /*x2, y2*/));
g_assert (gimp_channel_is_empty (selection));
/* Now simulate alt-click on the background layer */
g_assert (gimp_ui_synthesize_click (gtk_tree_view,
......@@ -381,9 +379,7 @@ alt_click_is_layer_to_selection (gconstpointer data)
/* Make sure we got a selection and that the active layer didn't
* change
*/
g_assert (gimp_channel_bounds (selection,
NULL, NULL, /*x1, y1*/
NULL, NULL /*x2, y2*/));
g_assert (! gimp_channel_is_empty (selection));
g_assert (gimp_image_get_active_layer (image) == active_layer);
/* Now simulate alt-click on the empty layer */
......@@ -397,9 +393,7 @@ alt_click_is_layer_to_selection (gconstpointer data)
/* Make sure that emptied the selection and that the active layer
* still didn't change
*/
g_assert (! gimp_channel_bounds (selection,
NULL, NULL, /*x1, y1*/
NULL, NULL /*x2, y2*/));
g_assert (gimp_channel_is_empty (selection));
g_assert (gimp_image_get_active_layer (image) == active_layer);
#endif
}
......
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