stack: assert for some assumptions

This commit is contained in:
Timm Bäder 2020-10-15 18:52:45 +02:00
parent b1664534af
commit 44728d09a9

View File

@ -2166,6 +2166,9 @@ gtk_stack_snapshot_cube (GtkWidget *widget,
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
double progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE);
g_assert (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT ||
priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT);
if (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT)
progress = 1 - progress;