summaryrefslogtreecommitdiffstats
path: root/src/sp-conn-end.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-03-11 21:23:04 +0000
committermental <mental@users.sourceforge.net>2007-03-11 21:23:04 +0000
commit4e432e5960cb8bc9feb6648087b54788c774d773 (patch)
treef83b7730dfb4ff96d45fb96e83367ab3dc28e56f /src/sp-conn-end.cpp
parentSwitch selection bounds and center to use NR::Maybe, addressing most of the (diff)
downloadinkscape-4e432e5960cb8bc9feb6648087b54788c774d773.tar.gz
inkscape-4e432e5960cb8bc9feb6648087b54788c774d773.zip
Eliminate remaining sources of empty NR::Rects
(bzr r2605)
Diffstat (limited to 'src/sp-conn-end.cpp')
-rw-r--r--src/sp-conn-end.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/sp-conn-end.cpp b/src/sp-conn-end.cpp
index 7a8a60dd0..dd6497526 100644
--- a/src/sp-conn-end.cpp
+++ b/src/sp-conn-end.cpp
@@ -71,12 +71,14 @@ sp_conn_end_move_compensate(NR::Matrix const *mp, SPItem *moved_item,
};
for (unsigned h = 0; h < 2; ++h) {
NR::Maybe<NR::Rect> bbox = h2attItem[h]->getBounds(NR::identity());
- if (bbox) {
- h2bbox_icoordsys[h] = *bbox;
- } else {
- // FIXME
- h2bbox_icoordsys[h] = NR::Rect(NR::Point(0, 0), NR::Point(0, 0));
+ if (!bbox) {
+ if (updatePathRepr) {
+ path->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ path->updateRepr();
+ }
+ return;
}
+ h2bbox_icoordsys[h] = *bbox;
h2i2anc[h] = i2anc_affine(h2attItem[h], ancestor);
h2endPt_icoordsys[h] = h2bbox_icoordsys[h].midpoint();
}
@@ -112,13 +114,15 @@ sp_conn_end_move_compensate(NR::Matrix const *mp, SPItem *moved_item,
NR::Rect otherpt_rect = NR::Rect(other_endpt, other_endpt);
NR::Rect h2bbox_icoordsys[2] = { otherpt_rect, otherpt_rect };
NR::Maybe<NR::Rect> bbox = h2attItem[ind]->getBounds(NR::identity());
- if (bbox) {
- h2bbox_icoordsys[ind] = *bbox;
- } else {
- // FIXME
- h2bbox_icoordsys[ind] = NR::Rect(NR::Point(0, 0), NR::Point(0, 0));
+ if (!bbox) {
+ if (updatePathRepr) {
+ path->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ path->updateRepr();
+ }
+ return;
}
+ h2bbox_icoordsys[ind] = *bbox;
h2i2anc = i2anc_affine(h2attItem[ind], ancestor);
h2endPt_icoordsys[ind] = h2bbox_icoordsys[ind].midpoint();