summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 924e9f1)
raw | patch | inline | side by side (parent: 924e9f1)
author | Josh Andler <scislac@gmail.com> | |
Fri, 13 Aug 2010 14:54:19 +0000 (07:54 -0700) | ||
committer | Josh Andler <scislac@gmail.com> | |
Fri, 13 Aug 2010 14:54:19 +0000 (07:54 -0700) |
index d3d69546c2e1ebfc0507dc4c357d4b87e7d93ea3..a7608bc568be8d86b18b7d49dbb5283b725909c1 100644 (file)
'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
- cmd = 'python -c "import uniconvertor"'
+ cmd = 'python -c "import uniconvertor; uniconvertor.uniconv_run()"'
run((cmd+' "%s" "%%s"') % sys.argv[1].replace("%","%%"), "UniConvertor")
index f7746c2f45ff2a1a5123871357aa4121a327545f..720666103c29b3398d6489487674c6d311f1384d 100644 (file)
'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
- cmd = 'python -c "from uniconvertor import uniconv; uniconv();"'
+ cmd = 'python -c "import uniconvertor; uniconvertor.uniconv_run();"'
return cmd
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index 88c84a84c449333d5d18cc94d3fcf10ff53e1547..a918f8745903f3dfeea95cb9fdc9593de80647f4 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
const bool routerInstanceExists = (item->document->router != NULL);
if (shapeRef && routerInstanceExists) {
- Router *router = shapeRef->router();
- router->removeShape(shapeRef);
+ // Deleting the shapeRef will remove it completely from
+ // an existing Router instance.
delete shapeRef;
}
shapeRef = NULL;
{
g_assert(shapeRef);
- router->removeShape(shapeRef);
+ // Deleting the shapeRef will remove it completely from
+ // an existing Router instance.
delete shapeRef;
shapeRef = NULL;
}
index b0e19219039824807761ce3bcb00470e5f6ae5d4..f7d18a33fd4ca11cb8567b3eeeaa8c1d32c91626 100644 (file)
if (cc->active_conn == item)
{
- // Just adjust handle positions.
- Geom::Point startpt = *(curve->first_point()) * i2d;
- sp_knot_set_position(cc->endpt_handle[0], startpt, 0);
+ if (curve->is_empty())
+ {
+ // Connector is invisible because it is clipped to the boundary of
+ // two overlpapping shapes.
+ sp_knot_hide(cc->endpt_handle[0]);
+ sp_knot_hide(cc->endpt_handle[1]);
+ }
+ else
+ {
+ // Just adjust handle positions.
+ Geom::Point startpt = *(curve->first_point()) * i2d;
+ sp_knot_set_position(cc->endpt_handle[0], startpt, 0);
- Geom::Point endpt = *(curve->last_point()) * i2d;
- sp_knot_set_position(cc->endpt_handle[1], endpt, 0);
+ Geom::Point endpt = *(curve->last_point()) * i2d;
+ sp_knot_set_position(cc->endpt_handle[1], endpt, 0);
+ }
return;
}
G_CALLBACK(endpt_handler), cc);
}
+ if (curve->is_empty())
+ {
+ // Connector is invisible because it is clipped to the boundary
+ // of two overlpapping shapes. So, it doesn't need endpoints.
+ return;
+ }
+
Geom::Point startpt = *(curve->first_point()) * i2d;
sp_knot_set_position(cc->endpt_handle[0], startpt, 0);
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;
}
}