diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index ded741dd..cac36774 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -43,6 +43,8 @@ #include "domain/UBGraphicsTextItem.h" #include "domain/UBGraphicsPixmapItem.h" #include "domain/UBGraphicsWidgetItem.h" +#include "domain/UBGraphicsPDFItem.h" +#include "domain/UBGraphicsPolygonItem.h" #include "domain/UBItem.h" #include "document/UBDocumentProxy.h" @@ -50,6 +52,9 @@ #include "customWidgets/UBDraggableLabel.h" #include "customWidgets/UBDraggableMedia.h" +#include "tools/UBGraphicsCompass.h" +#include "tools/UBGraphicsCache.h" + #include "core/memcheck.h" UBBoardView::UBBoardView (UBBoardController* pController, QWidget* pParent) @@ -422,9 +427,12 @@ UBBoardView::mousePressEvent (QMouseEvent *event) if (!movingItem || movingItem->isSelected() - || (movingItem->type() == UBGraphicsDelegateFrame::Type - || movingItem->type() == DelegateButton::Type) - || existingTools.contains(movingItem)) + || movingItem->type() == UBGraphicsDelegateFrame::Type + || movingItem->type() == DelegateButton::Type + || movingItem->type() == UBGraphicsCompass::Type + || movingItem->type() == UBGraphicsPDFItem::Type + || movingItem->type() == UBGraphicsPolygonItem::Type + || movingItem->type() == UBGraphicsCache::Type) { movingItem = NULL; QGraphicsView::mousePressEvent (event); diff --git a/src/domain/UBGraphicsDelegateFrame.cpp b/src/domain/UBGraphicsDelegateFrame.cpp index 393353d1..70fd85c3 100644 --- a/src/domain/UBGraphicsDelegateFrame.cpp +++ b/src/domain/UBGraphicsDelegateFrame.cpp @@ -84,6 +84,8 @@ UBGraphicsDelegateFrame::UBGraphicsDelegateFrame(UBGraphicsItemDelegate* pDelega setAntiScale(1.0); positionHandles(); + + this->setAcceptHoverEvents(true); } diff --git a/src/tools/UBGraphicsCurtainItem.cpp b/src/tools/UBGraphicsCurtainItem.cpp index 3dfb21b6..a71a224d 100644 --- a/src/tools/UBGraphicsCurtainItem.cpp +++ b/src/tools/UBGraphicsCurtainItem.cpp @@ -48,6 +48,7 @@ UBGraphicsCurtainItem::UBGraphicsCurtainItem(QGraphicsItem* parent) setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Tool); setPen(Qt::NoPen); + this->setAcceptHoverEvents(true); } UBGraphicsCurtainItem::~UBGraphicsCurtainItem()