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

This commit is contained in:
Michael Natterer 2015-07-01 11:55:26 +02:00
parent 731cfc7532
commit 64e506a052
1 changed files with 4 additions and 10 deletions

View File

@ -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
}