summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 7912b654a..0f79a609b 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -434,8 +434,7 @@ StrokeStyle::makeRadioButton(Gtk::RadioButton *tb, char const *icon,
* Gets the marker uri string and applies it to all selected
* items in the current desktop.
*/
-void
-StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMarkerLoc const which)
+void StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMarkerLoc const /*which*/)
{
if (spw->update) {
return;
@@ -485,12 +484,10 @@ StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMa
css = 0;
spw->update = false;
-
};
-void
-StrokeStyle::updateMarkerHist(SPMarkerLoc const which) {
-
+void StrokeStyle::updateMarkerHist(SPMarkerLoc const which)
+{
switch (which) {
case SP_MARKER_LOC_START:
startMarkerConn.block();
@@ -552,8 +549,9 @@ gboolean StrokeStyle::setStrokeWidthUnit(SPUnitSelector *,
gdouble average = stroke_average_width (objects);
- if (average == Geom::infinity() || average == 0)
+ if ((average == Geom::infinity()) || (average < 1e-8)){ //less than 1e-8: to campare against zero, while taking numeric accuracy into account
return FALSE;
+ }
#if WITH_GTKMM_3_0
(*spw->widthAdj)->set_value(100.0 * w / average);