diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-11-16 21:22:36 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-11-16 21:22:36 +0000 |
| commit | 8420f10fa1e70abe46a90978d28c16a6f3a8ea7b (patch) | |
| tree | 7902443eb1b06f8da5e3ff06db2090b392e96160 /src/splivarot.cpp | |
| parent | fix error su_v tell to me (diff) | |
| parent | fix typo in rev 12797 (diff) | |
| download | inkscape-8420f10fa1e70abe46a90978d28c16a6f3a8ea7b.tar.gz inkscape-8420f10fa1e70abe46a90978d28c16a6f3a8ea7b.zip | |
fix error su_v tell to me
(bzr r12588.1.28)
Diffstat (limited to 'src/splivarot.cpp')
| -rw-r--r-- | src/splivarot.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 7bf556aa1..e5006884c 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -1585,22 +1585,18 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Selected object is <b>not a path</b>, cannot inset/outset.")); return; } - if (SP_IS_SHAPE(item)) + else if (SP_IS_SHAPE(item)) { curve = SP_SHAPE(item)->getCurve(); - if (curve == NULL) { - return; - } } - if (SP_IS_TEXT(item)) + else // Item must be SP_TEXT { curve = SP_TEXT(item)->getNormalizedBpath(); - if (curve == NULL) { - return; - } } - - g_assert(curve != NULL); + + if (curve == NULL) { + return; + } Geom::Affine const transform(item->transform); @@ -1779,24 +1775,19 @@ sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset) items = items->next) { SPItem *item = SP_ITEM(items->data); + SPCurve *curve = NULL; if (!SP_IS_SHAPE(item) && !SP_IS_TEXT(item)) continue; - - SPCurve *curve = NULL; - if (SP_IS_SHAPE(item)) { + else if (SP_IS_SHAPE(item)) { curve = SP_SHAPE(item)->getCurve(); - if (curve == NULL) - continue; } - if (SP_IS_TEXT(item)) { + else { // Item must be SP_TEXT curve = SP_TEXT(item)->getNormalizedBpath(); - if (curve == NULL) - continue; } - // We've now checked that there is a curve for this item - g_assert(curve != NULL); + if (curve == NULL) + continue; Geom::Affine const transform(item->transform); |
