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/interface.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 '')
| -rw-r--r-- | src/interface.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index 83f4ac3c8..dad1146c0 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -1130,8 +1130,11 @@ sp_ui_drag_data_received(GtkWidget *widget, int const saved_pref = prefs_get_int_attribute("options.transform", "pattern", 1); prefs_set_int_attribute("options.transform", "pattern", 1); sp_document_ensure_up_to_date(sp_desktop_document(desktop)); - NR::Point m( desktop->point() - selection->bounds().midpoint() ); - sp_selection_move_relative(selection, m); + NR::Maybe<NR::Rect> sel_bbox = selection->bounds(); + if (sel_bbox) { + NR::Point m( desktop->point() - sel_bbox->midpoint() ); + sp_selection_move_relative(selection, m); + } prefs_set_int_attribute("options.transform", "pattern", saved_pref); } |
