Code

Filter effects dialog:
[inkscape.git] / src / connector-context.cpp
index 476b87bc633acea8dda52cbd0c523d5ea6536991..89d38bace98a69eba99ef7defd7291d058819917 100644 (file)
@@ -743,7 +743,7 @@ connector_handle_key_press(SPConnectorContext *const cc, guint const keyval)
                 
                 cc->state = SP_CONNECTOR_CONTEXT_IDLE;
                 desktop->messageStack()->flash( Inkscape::NORMAL_MESSAGE,
-                        _("Connector endpoint drag canceled."));
+                        _("Connector endpoint drag cancelled."));
                 ret = TRUE;
             }
             else if (cc->npoints != 0) {
@@ -1145,12 +1145,14 @@ static void cc_set_active_shape(SPConnectorContext *cc, SPItem *item)
     }
 
 
-    NR::Rect bbox = sp_item_bbox_desktop(cc->active_shape);
-    NR::Point center = bbox.midpoint();
-    sp_knot_set_position(cc->connpthandle, &center, 0);
-
-    sp_knot_show(cc->connpthandle);
-
+    NR::Maybe<NR::Rect> bbox = sp_item_bbox_desktop(cc->active_shape);
+    if (bbox) {
+        NR::Point center = bbox->midpoint();
+        sp_knot_set_position(cc->connpthandle, &center, 0);
+        sp_knot_show(cc->connpthandle);
+    } else {
+        sp_knot_hide(cc->connpthandle);
+    }
 }