Code

Modified filter rendering area handling to better accommodate upcoming feOffset
[inkscape.git] / src / dialogs / tiledialog.cpp
index b10f952da5848d9a9dc3e578c274eb14fd7a41fe..75311ddd03dc3fa3b837a9ea02ffe0fce9817240 100644 (file)
@@ -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);
     }
 
 /*