diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 7b8ef369..8413af44 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -503,6 +503,22 @@ void UBBoardView::handleItemsSelection(QGraphicsItem *item) } } } + }else{ + // Deselect the other items + foreach(QGraphicsItem* it, scene()->selectedItems()){ + UBGraphicsGroupContainerItem* pGroup = dynamic_cast(it); + if(NULL != pGroup){ + foreach(QGraphicsItem* pGIt, pGroup->childItems()){ + UBGraphicsTextItem* pTxt = dynamic_cast(pGIt); + if(NULL != pTxt){ + // We must clear the text selection + QTextCursor t = pTxt->textCursor(); + t.clearSelection(); + pTxt->setTextCursor(t); + } + } + } + } } }