Cursor upper widgets is the same as upper board.

Fixed restoring of cursors at mouse release event on board.
preferencesAboutTextFull
Aleksei Kanash 12 years ago
parent aa59455407
commit a3a24b7465
  1. 2
      src/board/UBBoardView.cpp
  2. 4
      src/domain/UBGraphicsProxyWidget.cpp
  3. 5
      src/domain/UBGraphicsScene.cpp

@ -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();
}
}

Loading…
Cancel
Save