Skip to content

Commit

Permalink
Fix xournalpp#3651 - remove pressure value on Highlighter strokes fir…
Browse files Browse the repository at this point in the history
…st point
  • Loading branch information
bhennion committed Dec 9, 2021
1 parent 29bee34 commit 55663e2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/control/tools/StrokeHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,14 @@ void StrokeHandler::onButtonPressEvent(const PositionInputData& pos) {
this->buttonDownPoint.x = pos.x / zoom;
this->buttonDownPoint.y = pos.y / zoom;

createStroke(Point(this->buttonDownPoint.x, this->buttonDownPoint.y, pos.pressure));
this->hasPressure = this->xournal->getControl()->getToolHandler()->getToolType() == TOOL_PEN &&
pos.pressure != Point::NO_PRESSURE;

this->hasPressure = this->stroke->getToolType() == STROKE_TOOL_PEN && pos.pressure != Point::NO_PRESSURE;
if (this->hasPressure) {
createStroke(Point(this->buttonDownPoint.x, this->buttonDownPoint.y, pos.pressure));
} else {
createStroke(Point(this->buttonDownPoint.x, this->buttonDownPoint.y));
}

stabilizer->initialize(this, zoom, pos);

Expand Down

0 comments on commit 55663e2

Please sign in to comment.