Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/board/UBBoardView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
scene ()->setToolCursor (currentTool);
setToolCursor (currentTool);

if (currentTool == UBStylusTool::Marker) {
scene()->drawMarkerCircle(scenePos);
}
else if (currentTool == UBStylusTool::Pen) {
scene()->drawPenCircle(scenePos);
}

scene ()->inputDeviceRelease ();

mPendingStylusReleaseEvent = false;
Expand Down Expand Up @@ -1329,6 +1336,15 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();

setToolCursor (currentTool);

QPointF scenePos = mapToScene(event->pos());
if (currentTool == UBStylusTool::Marker) {
scene()->drawMarkerCircle(scenePos);
}
else if (currentTool == UBStylusTool::Pen) {
scene()->drawPenCircle(scenePos);
}

// first/ propagate device release to the scene
if (scene())
scene()->inputDeviceRelease();
Expand Down
4 changes: 2 additions & 2 deletions src/domain/UBGraphicsScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ public slots:
void textUndoCommandAdded(UBGraphicsTextItem *textItem);

void setToolCursor(int tool);
void drawMarkerCircle(const QPointF& pEndPoint);
void drawPenCircle(const QPointF& pEndPoint);

void selectionChangedProcessing();
void moveMagnifier();
Expand Down Expand Up @@ -407,8 +409,6 @@ public slots:
void redrawEraser(bool pressed);
void hideEraser();
void drawPointer(const QPointF& pEndPoint, bool isFirstDraw = false);
void drawMarkerCircle(const QPointF& pEndPoint);
void drawPenCircle(const QPointF& pEndPoint);
void hideMarkerCircle();
void hidePenCircle();
void DisposeMagnifierQWidgets();
Expand Down