summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-03-05 05:50:20 +0000
committermental <mental@users.sourceforge.net>2007-03-05 05:50:20 +0000
commitd4867888572ff1cf3d5bbeaed8c68431f6834941 (patch)
tree95fbc8812495b00ce09c6f7dc46610eeba9fc9ca /src/selection-chemistry.cpp
parentclean up operators/constructors, and give reference-maybes a more compact (diff)
downloadinkscape-d4867888572ff1cf3d5bbeaed8c68431f6834941.tar.gz
inkscape-d4867888572ff1cf3d5bbeaed8c68431f6834941.zip
Separate NRRect and NR::Rect a bit further; the goal is to get to the point where there is no way to create an empty NR::Rect
(bzr r2551)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 34041b204..57fa6bb84 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -2807,22 +2807,22 @@ void fit_canvas_to_selection(SPDesktop *desktop) {
g_return_if_fail(doc != NULL);
g_return_if_fail(desktop->selection != NULL);
g_return_if_fail(!desktop->selection->isEmpty());
- NRRect bbox = {0,0,0,0};
+ NRRect bbox(0, 0, 0, 0);
desktop->selection->bounds(&bbox);
- if (!empty(bbox)) {
+ if (!nr_rect_d_test_empty(&bbox)) {
doc->fitToRect(bbox);
}
};
void fit_canvas_to_drawing(SPDocument *doc) {
g_return_if_fail(doc != NULL);
- NRRect bbox = {0,0,0,0};
+ NRRect bbox(0, 0, 0, 0);
sp_document_ensure_up_to_date (doc);
sp_item_invoke_bbox(SP_ITEM(doc->root), &bbox, sp_item_i2r_affine(SP_ITEM(doc->root)), TRUE);
- if (!empty(bbox)) {
+ if (!nr_rect_d_test_empty(&bbox)) {
doc->fitToRect(bbox);
}
};