diff options
| author | VinÃcius dos Santos Oliveira <vini.ipsmaker@gmail.com> | 2014-03-10 02:20:18 +0000 |
|---|---|---|
| committer | VinÃcius dos Santos Oliveira <vini.ipsmaker@gmail.com> | 2014-03-10 02:20:18 +0000 |
| commit | 4b8c6b64ba7ac54955cc68aa6ad18c67b57ef5fb (patch) | |
| tree | 2dfb7ff1df48335325d9a0c2e30316ccdfd3227a /src/ui/tools/freehand-base.cpp | |
| parent | Shortening code through removal of variable declaration used only at one (diff) | |
| download | inkscape-4b8c6b64ba7ac54955cc68aa6ad18c67b57ef5fb.tar.gz inkscape-4b8c6b64ba7ac54955cc68aa6ad18c67b57ef5fb.zip | |
Removing repeated condition logical test to make the code more readable
and easier to follow.
(bzr r11950.6.2)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 4b7a310e3..3f74a5147 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -540,6 +540,11 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed) if(Geom::are_near(dc->sa->curve->first_path()->initialPoint(), dc->ea->dp)){ dc->sa->curve->closepath_current(); } + + // if the curve has an bspline or spiro LPE, we execute + // spdc_flush_white, passing the necessary starting curve. + dc->white_curves = g_slist_remove(dc->white_curves, dc->sa->curve); + spdc_flush_white(dc, dc->sa->curve); }else{ if (dc->sa->start && !(dc->sa->curve->is_closed()) ) { c = reverse_then_unref(c); @@ -547,16 +552,9 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed) dc->sa->curve->append_continuous(c, 0.0625); c->unref(); dc->sa->curve->closepath_current(); - } - - //if the curve has an bspline or spiro LPE, we execute spdc_flush_white, passing the necessary starting curve. - if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 || - prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){ - dc->white_curves = g_slist_remove(dc->white_curves, dc->sa->curve); - spdc_flush_white(dc, dc->sa->curve); - }else{ spdc_flush_white(dc, NULL); } + return; } |
