summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-08-28 20:56:45 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-08-28 20:56:45 +0000
commit2060b51388328fb188cdb05825a9a10d9c230878 (patch)
tree1ea993a878d521f3bdeae1aa4a9f8cac548c04b1 /src/ui/tools/freehand-base.cpp
parentMinnor tweak on powerstroke LPE (diff)
downloadinkscape-2060b51388328fb188cdb05825a9a10d9c230878.tar.gz
inkscape-2060b51388328fb188cdb05825a9a10d9c230878.zip
Allow pressure in pencil in the tree modes, bezier, bspline and spiro
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
-rw-r--r--src/ui/tools/freehand-base.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index f7663d062..072500144 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -94,6 +94,7 @@ FreehandBase::FreehandBase(gchar const *const *cursor_shape)
, waiting_LPE_type(Inkscape::LivePathEffect::INVALID_LPE)
, red_curve_is_valid(false)
, anchor_statusbar(false)
+ , input_has_pressure(false)
, pressure(DEFAULT_PRESSURE)
{
}
@@ -235,7 +236,7 @@ static void spdc_apply_powerstroke_shape(std::vector<Geom::Point> points, Freeha
if (SP_IS_PENCIL_CONTEXT(dc)) {
PencilTool *pt = SP_PENCIL_CONTEXT(dc);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 3) {
+ if (dc->input_has_pressure) {
SPShape *sp_shape = dynamic_cast<SPShape *>(item);
if (sp_shape) {
SPCurve * c = sp_shape->getCurve();
@@ -401,7 +402,7 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item,
swidth = swidth/2;
}
if (SP_IS_PENCIL_CONTEXT(dc)) {
- if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 3) {
+ if (dc->input_has_pressure) {
std::vector<Geom::Point> points;
spdc_apply_powerstroke_shape(points, dc, item);
shape = NONE;