summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-03-17 19:00:45 +0000
committermental <mental@users.sourceforge.net>2007-03-17 19:00:45 +0000
commit70dcb712d89b98453c4ea6e4868c88af8d2887e4 (patch)
treec19680dd8b7c41260a6224b54f3e1712a1da08da /src/selection-chemistry.cpp
parentclean up rect mess a bit before start working on other stuff (diff)
downloadinkscape-70dcb712d89b98453c4ea6e4868c88af8d2887e4.tar.gz
inkscape-70dcb712d89b98453c4ea6e4868c88af8d2887e4.zip
re-introduce isEmpty tests
(bzr r2679)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp10
1 files changed, 5 insertions, 5 deletions
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<NR::Rect> 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<NR::Rect> 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<NR::Rect> 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<NR::Rect> 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<NR::Rect> r = selection->bounds();
- if ( !r ) {
+ if ( !r || r->isEmpty() ) {
return;
}