From 70dcb712d89b98453c4ea6e4868c88af8d2887e4 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Sat, 17 Mar 2007 19:00:45 +0000 Subject: re-introduce isEmpty tests (bzr r2679) --- src/selection-chemistry.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index b2ba56f62..1fe70b896 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1195,7 +1195,7 @@ void sp_selection_paste_size (bool apply_x, bool apply_y) } NR::Maybe current = selection->bounds(); - if ( !current || current->extent(NR::X) < 1e-6 || current->extent(NR::Y) < 1e-6 ) { + if ( !current || current->isEmpty() ) { return; } @@ -1234,7 +1234,7 @@ void sp_selection_paste_size_separately (bool apply_x, bool apply_y) SPItem *item = SP_ITEM(l->data); NR::Maybe current = sp_item_bbox_desktop(item); - if ( !current || current->extent(NR::X) < 1e-6 || current->extent(NR::Y) < 1e-6 ) { + if ( !current || current->isEmpty() ) { continue; } @@ -1527,7 +1527,7 @@ sp_selection_scale_absolute(Inkscape::Selection *selection, return; NR::Maybe const bbox(selection->bounds()); - if ( !bbox ) { + if ( !bbox || bbox->isEmpty() ) { return; } @@ -1550,7 +1550,7 @@ void sp_selection_scale_relative(Inkscape::Selection *selection, NR::Point const NR::Maybe const bbox(selection->bounds()); - if ( !bbox ) { + if ( !bbox || bbox->isEmpty() ) { return; } @@ -2202,7 +2202,7 @@ sp_selection_tile(bool apply) sp_document_ensure_up_to_date(document); NR::Maybe r = selection->bounds(); - if ( !r ) { + if ( !r || r->isEmpty() ) { return; } -- cgit v1.2.3