From 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 11 Oct 2008 11:16:23 -0400 Subject: Merging from trunk (bzr r6884) --- src/dialogs/tiledialog.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/dialogs/tiledialog.cpp') diff --git a/src/dialogs/tiledialog.cpp b/src/dialogs/tiledialog.cpp index 99919d127..1643057e8 100644 --- a/src/dialogs/tiledialog.cpp +++ b/src/dialogs/tiledialog.cpp @@ -48,8 +48,8 @@ sp_compare_x_position(SPItem *first, SPItem *second) using Geom::X; using Geom::Y; - boost::optional a = to_2geom(first->getBounds(sp_item_i2doc_affine(first))); - boost::optional b = to_2geom(second->getBounds(sp_item_i2doc_affine(second))); + boost::optional a = first->getBounds(sp_item_i2doc_affine(first)); + boost::optional b = second->getBounds(sp_item_i2doc_affine(second)); if ( !a || !b ) { // FIXME? @@ -88,8 +88,8 @@ sp_compare_x_position(SPItem *first, SPItem *second) int sp_compare_y_position(SPItem *first, SPItem *second) { - boost::optional a = to_2geom(first->getBounds(sp_item_i2doc_affine(first))); - boost::optional b = to_2geom(second->getBounds(sp_item_i2doc_affine(second))); + boost::optional a = first->getBounds(sp_item_i2doc_affine(first)); + boost::optional b = second->getBounds(sp_item_i2doc_affine(second)); if ( !a || !b ) { // FIXME? @@ -168,7 +168,7 @@ void TileDialog::Grid_Arrange () cnt=0; for (; items != NULL; items = items->next) { SPItem *item = SP_ITEM(items->data); - boost::optional b = to_2geom(item->getBounds(sp_item_i2doc_affine(item))); + boost::optional b = item->getBounds(sp_item_i2doc_affine(item)); if (!b) { continue; } @@ -210,7 +210,7 @@ void TileDialog::Grid_Arrange () const GSList *sizes = sorted; for (; sizes != NULL; sizes = sizes->next) { SPItem *item = SP_ITEM(sizes->data); - boost::optional b = to_2geom(item->getBounds(sp_item_i2doc_affine(item))); + boost::optional b = item->getBounds(sp_item_i2doc_affine(item)); if (b) { width = b->dimensions()[Geom::X]; height = b->dimensions()[Geom::Y]; @@ -267,7 +267,7 @@ void TileDialog::Grid_Arrange () } - boost::optional sel_bbox = to_2geom(selection->bounds()); + boost::optional sel_bbox = selection->bounds(); // Fit to bbox, calculate padding between rows accordingly. if ( sel_bbox && !SpaceManualRadioButton.get_active() ){ #ifdef DEBUG_GRID_ARRANGE @@ -317,7 +317,7 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h for (; current_row != NULL; current_row = current_row->next) { SPItem *item=SP_ITEM(current_row->data); Inkscape::XML::Node *repr = SP_OBJECT_REPR(item); - boost::optional b = to_2geom(item->getBounds(sp_item_i2doc_affine(item))); + boost::optional b = item->getBounds(sp_item_i2doc_affine(item)); Geom::Point min; if (b) { width = b->dimensions()[Geom::X]; @@ -345,11 +345,8 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h g_slist_free (current_row); } - NRRect b; - selection->bounds(&b); - - sp_document_done (sp_desktop_document (desktop), SP_VERB_SELECTION_GRIDTILE, - _("Arrange in a grid")); + sp_document_done (sp_desktop_document (desktop), SP_VERB_SELECTION_GRIDTILE, + _("Arrange in a grid")); } -- cgit v1.2.3