Merge branch 'release-candidate' of github.com:Sankore/Sankore-3.1 into release-candidate

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit 012517ac24
  1. 9
      src/board/UBBoardController.cpp
  2. 6
      src/board/UBBoardView.cpp

@ -2362,10 +2362,17 @@ void UBBoardController::togglePodcast(bool checked)
void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* graphicsWidget) void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* graphicsWidget)
{ {
mActiveScene->setURStackEnable(false); mActiveScene->setURStackEnable(false);
UBGraphicsItem *toolW3C = duplicateItem(dynamic_cast<UBItem *>(graphicsWidget));
UBGraphicsWidgetItem *copyedGraphicsWidget = NULL;
if (UBGraphicsWidgetItem::Type == toolW3C->type())
copyedGraphicsWidget = static_cast<UBGraphicsWidgetItem *>(toolW3C);
UBToolWidget *toolWidget = new UBToolWidget(copyedGraphicsWidget, mControlView);
graphicsWidget->remove(false); graphicsWidget->remove(false);
mActiveScene->addItemToDeletion(graphicsWidget); mActiveScene->addItemToDeletion(graphicsWidget);
UBToolWidget *toolWidget = new UBToolWidget(graphicsWidget, mControlView);
mActiveScene->setURStackEnable(true); mActiveScene->setURStackEnable(true);
QPoint controlViewPos = mControlView->mapFromScene(graphicsWidget->sceneBoundingRect().center()); QPoint controlViewPos = mControlView->mapFromScene(graphicsWidget->sceneBoundingRect().center());

@ -866,6 +866,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos = event->pos (); mMouseDownPos = event->pos ();
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
if (!movingItem) if (!movingItem)
emit clickOnBoard(); emit clickOnBoard();
@ -1099,6 +1100,11 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
if (currentTool == UBStylusTool::Selector) if (currentTool == UBStylusTool::Selector)
{ {
bool bReleaseIsNeed = true; bool bReleaseIsNeed = true;
if (movingItem != determineItemToPress(scene()->itemAt(this->mapToScene(event->posF().toPoint()))))
{
movingItem = NULL;
bReleaseIsNeed = false;
}
if (mWidgetMoved) if (mWidgetMoved)
{ {
mWidgetMoved = false; mWidgetMoved = false;

Loading…
Cancel
Save