From 0dff805e40722f7cdbb421bf7bd581713a023cf3 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sun, 9 Oct 2016 14:18:15 +0300 Subject: Refactoring/styling: extract a statement. (bzr r15100.1.38) --- src/widgets/eraser-toolbar.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/widgets/eraser-toolbar.cpp') diff --git a/src/widgets/eraser-toolbar.cpp b/src/widgets/eraser-toolbar.cpp index 1171e98f0..2d5d40cfd 100644 --- a/src/widgets/eraser-toolbar.cpp +++ b/src/widgets/eraser-toolbar.cpp @@ -92,18 +92,14 @@ static void sp_set_tbl_eraser_mode_visibility(GObject *const tbl, const guint er GtkAction *split = GTK_ACTION( g_object_get_data(tbl, "split") ); gboolean visibility; if (eraser_mode != ERASER_MODE_DELETE) { - if(eraser_mode == ERASER_MODE_CUT) { - gtk_action_set_visible( split, TRUE ); - } else { - gtk_action_set_visible( split, FALSE ); - } + gtk_action_set_visible( split, (eraser_mode == ERASER_MODE_CUT) ? TRUE : FALSE ); visibility = TRUE; } else { visibility = FALSE; gtk_action_set_visible( split, FALSE ); } const std::array arr = {"cap_rounding", "mass", "thinning", "tremor", "usepressure", "width"}; - for(const gchar * str : arr) { + for (const gchar * str : arr) { gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, str) ), visibility ); } } -- cgit v1.2.3