diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2016-10-09 11:18:15 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2016-10-09 11:18:15 +0000 |
| commit | 0dff805e40722f7cdbb421bf7bd581713a023cf3 (patch) | |
| tree | 36fae793c8c5d124ccc8c37e26bf7fdb36a40671 /src/widgets/eraser-toolbar.cpp | |
| parent | Replace assignments and set_vis()es with a foreach. (diff) | |
| download | inkscape-0dff805e40722f7cdbb421bf7bd581713a023cf3.tar.gz inkscape-0dff805e40722f7cdbb421bf7bd581713a023cf3.zip | |
Refactoring/styling: extract a statement.
(bzr r15100.1.38)
Diffstat (limited to 'src/widgets/eraser-toolbar.cpp')
| -rw-r--r-- | src/widgets/eraser-toolbar.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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<const gchar *, 6> 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 ); } } |
