Commit a3a24b74 authored by Aleksei Kanash's avatar Aleksei Kanash

Cursor upper widgets is the same as upper board.

Fixed restoring of cursors at mouse release event on board.
......@@ -626,6 +626,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
{
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();
setToolCursor (currentTool);
// first propagate device release to the scene
if (scene ())
scene ()->inputDeviceRelease ();
......@@ -1019,6 +1020,7 @@ UBBoardView::setToolCursor (int tool)
break;
case UBStylusTool::Eraser:
controlViewport->setCursor (UBResources::resources ()->eraserCursor);
scene()->hideEraser();
break;
case UBStylusTool::Marker:
controlViewport->setCursor (UBResources::resources ()->markerCursor);
......
......@@ -47,6 +47,10 @@ UBGraphicsProxyWidget::~UBGraphicsProxyWidget()
QVariant UBGraphicsProxyWidget::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemCursorHasChanged && scene())
{
unsetCursor();
}
if ((change == QGraphicsItem::ItemSelectedHasChanged)
&& scene())
{
......
......@@ -2372,9 +2372,4 @@ void UBGraphicsScene::setToolCursor(int tool)
{
deselectAllItems();
}
if (tool != (int)UBStylusTool::Eraser)
{
hideEraser();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment