|
|
@ -28,6 +28,7 @@ |
|
|
|
#include "core/UBApplication.h" |
|
|
|
#include "core/UBApplication.h" |
|
|
|
#include "core/UBSetting.h" |
|
|
|
#include "core/UBSetting.h" |
|
|
|
#include "core/UBPersistenceManager.h" |
|
|
|
#include "core/UBPersistenceManager.h" |
|
|
|
|
|
|
|
#include "core/UB.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "network/UBHttpGet.h" |
|
|
|
#include "network/UBHttpGet.h" |
|
|
|
|
|
|
|
|
|
|
@ -446,6 +447,16 @@ bool UBBoardView::isUBItem(QGraphicsItem *item) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBBoardView::isCppTool(QGraphicsItem *item) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (item->type() == UBGraphicsItemType::CompassItemType |
|
|
|
|
|
|
|
|| item->type() == UBGraphicsItemType::RulerItemType |
|
|
|
|
|
|
|
|| item->type() == UBGraphicsItemType::ProtractorItemType |
|
|
|
|
|
|
|
|| item->type() == UBGraphicsItemType::TriangleItemType |
|
|
|
|
|
|
|
|| item->type() == UBGraphicsItemType::AristoItemType |
|
|
|
|
|
|
|
|| item->type() == UBGraphicsItemType::CurtainItemType); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardView::handleItemsSelection(QGraphicsItem *item) |
|
|
|
void UBBoardView::handleItemsSelection(QGraphicsItem *item) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// we need to select new pressed itemOnBoard and deselect all other items.
|
|
|
|
// we need to select new pressed itemOnBoard and deselect all other items.
|
|
|
@ -1137,7 +1148,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) |
|
|
|
movingItem = NULL; |
|
|
|
movingItem = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
if (movingItem) |
|
|
|
if (movingItem && !isCppTool(movingItem)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (suspendedMousePressEvent) |
|
|
|
if (suspendedMousePressEvent) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1153,7 +1164,6 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) |
|
|
|
DelegateButton::Type != movingItem->type() && |
|
|
|
DelegateButton::Type != movingItem->type() && |
|
|
|
QGraphicsSvgItem::Type != movingItem->type() && |
|
|
|
QGraphicsSvgItem::Type != movingItem->type() && |
|
|
|
UBGraphicsDelegateFrame::Type != movingItem->type() && |
|
|
|
UBGraphicsDelegateFrame::Type != movingItem->type() && |
|
|
|
// UBToolWidget::Type != movingItem->type() &&
|
|
|
|
|
|
|
|
UBGraphicsCache::Type != movingItem->type() && |
|
|
|
UBGraphicsCache::Type != movingItem->type() && |
|
|
|
QGraphicsWebView::Type != movingItem->type() && // for W3C widgets as Tools.
|
|
|
|
QGraphicsWebView::Type != movingItem->type() && // for W3C widgets as Tools.
|
|
|
|
!(!isMultipleSelectionEnabled() && movingItem->parentItem() && UBGraphicsWidgetItem::Type == movingItem->type() && UBGraphicsGroupContainerItem::Type == movingItem->parentItem()->type())) |
|
|
|
!(!isMultipleSelectionEnabled() && movingItem->parentItem() && UBGraphicsWidgetItem::Type == movingItem->type() && UBGraphicsGroupContainerItem::Type == movingItem->parentItem()->type())) |
|
|
@ -1175,6 +1185,8 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
bReleaseIsNeed = true; |
|
|
|
|
|
|
|
|
|
|
|
if (mUBRubberBand && mUBRubberBand->isVisible()) { |
|
|
|
if (mUBRubberBand && mUBRubberBand->isVisible()) { |
|
|
|
mUBRubberBand->hide(); |
|
|
|
mUBRubberBand->hide(); |
|
|
|