diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-06-17 20:51:09 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-08-05 00:31:06 +0000 |
| commit | a989bfb85b3827e97881b096c11f4fa6beb58496 (patch) | |
| tree | 80f3c8301a3d5eddf1f0b9eabdeafdb3256ab9a4 /src/widgets/dash-selector.cpp | |
| parent | Refactor with Tav help (diff) | |
| download | inkscape-a989bfb85b3827e97881b096c11f4fa6beb58496.tar.gz inkscape-a989bfb85b3827e97881b096c11f4fa6beb58496.zip | |
Fixes compiling bugs
Diffstat (limited to 'src/widgets/dash-selector.cpp')
| -rw-r--r-- | src/widgets/dash-selector.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp index 5ad74914a..7c3f32765 100644 --- a/src/widgets/dash-selector.cpp +++ b/src/widgets/dash-selector.cpp @@ -152,6 +152,8 @@ void SPDashSelector::set_dash (int ndash, double *dash, double o) int pos = -1; // Allows custom patterns to remain unscathed by this. int count = 0; // will hold the NULL terminator at the end of the dashes list if (ndash > 0) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + gboolean scale = prefs->getBool("/options/dash/scale", true); double delta = 0.0; for (int i = 0; i < ndash; i++) delta += dash[i]; @@ -165,9 +167,13 @@ void SPDashSelector::set_dash (int ndash, double *dash, double o) if (np == ndash) { int j; for (j = 0; j < ndash; j++) { - - if (!Geom::are_near(dash[j], pattern[j], delta)) - break; + if (scale) { + if (!Geom::are_near(dash[j], pattern[j], delta)) + break; + } else { + if (!Geom::are_near(dash[j], pattern[j], delta)) + break; + } } if (j == ndash) { pos = i; |
