Resolved an issue related to text item on unselection

preferencesAboutTextFull
Didier Clerc 12 years ago
parent 2dbade1a79
commit ae923f4a7c
  1. 16
      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<UBGraphicsGroupContainerItem*>(it);
if(NULL != pGroup){
foreach(QGraphicsItem* pGIt, pGroup->childItems()){
UBGraphicsTextItem* pTxt = dynamic_cast<UBGraphicsTextItem*>(pGIt);
if(NULL != pTxt){
// We must clear the text selection
QTextCursor t = pTxt->textCursor();
t.clearSelection();
pTxt->setTextCursor(t);
}
}
}
}
}
}

Loading…
Cancel
Save