summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d73d1fa)
raw | patch | inline | side by side (parent: d73d1fa)
author | Michael Wybrow <mjwybrow@users.sf.net> | |
Fri, 13 Aug 2010 07:39:25 +0000 (17:39 +1000) | ||
committer | Michael Wybrow <mjwybrow@users.sf.net> | |
Fri, 13 Aug 2010 07:39:25 +0000 (17:39 +1000) |
paths marked as connectors were always open. Now it just treats them as
connectors if they are open, or normal objects otherwise.
connectors if they are open, or normal objects otherwise.
src/connector-context.cpp | patch | blob | history |
index 1263a9215086a068821fcbcf8179cca754d78f2b..f862abac4231bf8c6d451c423538048b7bf84858 100644 (file)
bool cc_item_is_connector(SPItem *item)
{
if (SP_IS_PATH(item)) {
- if (SP_PATH(item)->connEndPair.isAutoRoutingConn()) {
- g_assert( SP_PATH(item)->original_curve ? !(SP_PATH(item)->original_curve->is_closed()) : !(SP_PATH(item)->curve->is_closed()) );
+ bool closed = SP_PATH(item)->original_curve ? SP_PATH(item)->original_curve->is_closed() : SP_PATH(item)->curve->is_closed();
+ if (SP_PATH(item)->connEndPair.isAutoRoutingConn() && !closed) {
+ // To be considered a connector, an object must be a non-closed
+ // path that is marked with a "inkscape:connector-type" attribute.
return true;
}
}