Code

Change CMS preference widgets to not expand
[inkscape.git] / src / sp-conn-end-pair.cpp
index 40f939e25a596eb92492de255bbf774d42bd3e38..7c85277768d7e87581e4d118f01b00091f030ec2 100644 (file)
@@ -164,8 +164,13 @@ SPConnEndPair::getEndpoints(NR::Point endPts[]) const {
 
     for (unsigned h = 0; h < 2; ++h) {
         if ( h2attItem[h] ) {
-            NR::Rect const bbox = h2attItem[h]->invokeBbox(sp_item_i2doc_affine(h2attItem[h]));
-            endPts[h] = bbox.midpoint();
+            NR::Maybe<NR::Rect> bbox = h2attItem[h]->getBounds(sp_item_i2doc_affine(h2attItem[h]));
+            if (bbox) {
+                endPts[h] = bbox->midpoint();
+            } else {
+                // FIXME
+                endPts[h] = NR::Point(0, 0);
+            }
         }
         else
         {