diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-11 19:57:07 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-11 19:57:07 +0000 |
| commit | 58b0e69b7336a8a06c447cf786f73df903120e53 (patch) | |
| tree | 7b4e064fee2a8813127b3c1f3ee3a68425d8990c /src/dialogs/tiledialog.cpp | |
| parent | Add ctrl+click to paint bucket to change clicked object's fill and stroke to ... (diff) | |
| download | inkscape-58b0e69b7336a8a06c447cf786f73df903120e53.tar.gz inkscape-58b0e69b7336a8a06c447cf786f73df903120e53.zip | |
Switch selection bounds and center to use NR::Maybe, addressing most of the
recent bbox regressions.
(bzr r2604)
Diffstat (limited to 'src/dialogs/tiledialog.cpp')
| -rw-r--r-- | src/dialogs/tiledialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dialogs/tiledialog.cpp b/src/dialogs/tiledialog.cpp index b10f952da..75311ddd0 100644 --- a/src/dialogs/tiledialog.cpp +++ b/src/dialogs/tiledialog.cpp @@ -268,14 +268,14 @@ void TileDialog::Grid_Arrange () } + NR::Maybe<NR::Rect> sel_bbox = selection->bounds(); // Fit to bbox, calculate padding between rows accordingly. - if (!SpaceManualRadioButton.get_active()){ - NR::Rect b = selection->bounds(); + if ( sel_bbox && !SpaceManualRadioButton.get_active() ){ #ifdef DEBUG_GRID_ARRANGE g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_height,total_col_width, b.extent(NR::X), b.extent(NR::Y)); #endif - paddingx = (b.extent(NR::X) - total_col_width) / (NoOfCols -1); - paddingy = (b.extent(NR::Y) - total_row_height) / (NoOfRows -1); + paddingx = (sel_bbox->extent(NR::X) - total_col_width) / (NoOfCols -1); + paddingy = (sel_bbox->extent(NR::Y) - total_row_height) / (NoOfRows -1); } /* |
