summaryrefslogtreecommitdiffstats
path: root/src/connector-context.cpp
diff options
context:
space:
mode:
authormjwybrow <mjwybrow@users.sourceforge.net>2006-05-12 04:13:28 +0000
committermjwybrow <mjwybrow@users.sourceforge.net>2006-05-12 04:13:28 +0000
commitd85d9cff57b1c28817fbf6c966288e4ad765910f (patch)
tree44c005b0ba549cf8a78bb49abe26b9cf3c6d677d /src/connector-context.cpp
parentre-generated tutorials with updated calligraphy and advanced in english, as w... (diff)
downloadinkscape-d85d9cff57b1c28817fbf6c966288e4ad765910f.tar.gz
inkscape-d85d9cff57b1c28817fbf6c966288e4ad765910f.zip
* src/ui/dialog/inkscape-preferences.cpp,
src/ui/dialog/inkscape-preferences.h, src/connector-context.cpp: Add a preferences setting to the connector tool for setting whether or not connectors attach to text objects. This addresses feature request #1434292. (bzr r810)
Diffstat (limited to 'src/connector-context.cpp')
-rw-r--r--src/connector-context.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/connector-context.cpp b/src/connector-context.cpp
index 798725363..10312c411 100644
--- a/src/connector-context.cpp
+++ b/src/connector-context.cpp
@@ -17,13 +17,14 @@
* an object involves going inside C but without entering S.)
* o Draw connectors to shape edges rather than bounding box.
* o Show a visual indicator for objects with the 'avoid' property set.
+ * o Allow user to change a object between a path and connector through
+ * the interface.
* o Create an interface for setting markers (arrow heads).
* o Better distinguish between paths and connectors to prevent problems
* in the node tool and paths accidently being turned into connectors
* in the connector tool. Perhaps have a way to convert between.
* o Only call libavoid's updateEndPoint as required. Currently we do it
* for both endpoints, even if only one is moving.
- * o Cleanup to remove unecessary borrowed DrawContext code.
* o Allow user-placeable connection points.
* o Deal sanely with connectors with both endpoints attached to the
* same connection point, and drawing of connectors attaching
@@ -68,6 +69,9 @@
#include "libavoid/vertices.h"
#include "context-fns.h"
#include "sp-namedview.h"
+#include "sp-text.h"
+#include "sp-flowtext.h"
+
static void sp_connector_context_class_init(SPConnectorContextClass *klass);
static void sp_connector_context_init(SPConnectorContext *conn_context);
@@ -1206,6 +1210,12 @@ static bool cc_item_is_shape(SPItem *item)
return false;
}
}
+ else if (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item)) {
+ if (prefs_get_int_attribute("tools.connector", "ignoretext", 1) == 1) {
+ // Don't count text as a shape we can connect connector to.
+ return false;
+ }
+ }
return true;
}