From d4867888572ff1cf3d5bbeaed8c68431f6834941 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 5 Mar 2007 05:50:20 +0000 Subject: 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) --- src/selection-chemistry.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/selection-chemistry.cpp') 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); } }; -- cgit v1.2.3