summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-24 23:31:44 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-24 23:31:44 +0000
commitfae4db6d2c975173a6768bd4984eb707265f4e43 (patch)
tree5f2a213743a58ba45d47aeb5e49f67d3e0b78981 /src/ui/tools
parentastyle (diff)
parent3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff)
downloadinkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.tar.gz
inkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.zip
update to trunk
(bzr r13645.1.106)
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/pen-tool.cpp21
-rw-r--r--src/ui/tools/tool-base.h7
2 files changed, 20 insertions, 8 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 38892517d..827dbf5c3 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -1351,8 +1351,9 @@ void PenTool::_bsplineSpiroColor()
void PenTool::_bsplineSpiro(bool shift)
{
- if(!this->spiro && !this->bspline)
+ if(!this->spiro && !this->bspline){
return;
+ }
shift?this->_bsplineSpiroOff():this->_bsplineSpiroOn();
this->_bsplineSpiroBuild();
@@ -1413,13 +1414,19 @@ void PenTool::_bsplineSpiroStartAnchor(bool shift)
}else{
this->spiro = false;
}
- if(!this->spiro && !this->bspline)
+ if(!this->spiro && !this->bspline){
+ SPCurve *tmp_curve = this->sa->curve->copy();
+ if (this->sa->start) {
+ tmp_curve = tmp_curve ->create_reverse();
+ }
+ this->overwrite_curve = tmp_curve ;
return;
-
- if(shift)
+ }
+ if(shift){
this->_bsplineSpiroStartAnchorOff();
- else
+ } else {
this->_bsplineSpiroStartAnchorOn();
+ }
}
void PenTool::_bsplineSpiroStartAnchorOn()
@@ -1482,9 +1489,9 @@ void PenTool::_bsplineSpiroStartAnchorOff()
}
void PenTool::_bsplineSpiroMotion(bool shift){
- if(!this->spiro && !this->bspline)
+ if(!this->spiro && !this->bspline){
return;
-
+ }
using Geom::X;
using Geom::Y;
if(this->red_curve->is_empty()) return;
diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h
index 7a6ab83e7..58eb6f88e 100644
--- a/src/ui/tools/tool-base.h
+++ b/src/ui/tools/tool-base.h
@@ -75,7 +75,12 @@ public:
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
double value = prefs->getDoubleLimited("/options/snapdelay/value", 0, 0, 1000);
- _timer_id = g_timeout_add(value, &sp_event_context_snap_watchdog_callback, this);
+ // We used to have this specified in milliseconds; this has changed to seconds now for consistency's sake
+ if (value > 1) { // Apparently we have an old preference file, this value must have been in milliseconds;
+ value = value / 1000.0; // now convert this value to seconds
+ }
+
+ _timer_id = g_timeout_add(value*1000.0, &sp_event_context_snap_watchdog_callback, this);
_event = gdk_event_copy((GdkEvent*) event);
((GdkEventMotion *)_event)->time = GDK_CURRENT_TIME;