From 13586717311b38bcddfa82602aa39c73e332dc87 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sat, 1 Oct 2016 17:27:14 +0300 Subject: Extract a method instead of assigning a temp bool var. (bzr r15100.1.27) --- src/widgets/stroke-style.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index f5735190f..47131dec1 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -437,6 +437,12 @@ StrokeStyle::makeRadioButton(Gtk::RadioButtonGroup &grp, return tb; } +bool StrokeStyle::shouldMarkersBeUpdated() +{ + return startMarkerCombo->update() || midMarkerCombo->update() || + endMarkerCombo->update(); +} + /** * Handles when user selects one of the markers from the marker combobox. * Gets the marker uri string and applies it to all selected @@ -444,11 +450,7 @@ StrokeStyle::makeRadioButton(Gtk::RadioButtonGroup &grp, */ void StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMarkerLoc const /*which*/) { - bool markers_update = spw->startMarkerCombo->update() || - spw->midMarkerCombo->update() || - spw->endMarkerCombo->update(); - - if (spw->update || markers_update) { + if (spw->update || spw->shouldMarkersBeUpdated()) { return; } -- cgit v1.2.3