Commit 8081ab13 authored by Clément Fauconnier's avatar Clément Fauconnier

fix an issue where the text could be in interaction mode without being selected

parent 87892b6e
......@@ -253,13 +253,15 @@ void UBGraphicsTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
QGraphicsTextItem::paint(painter, &styleOption, widget);
if (widget == UBApplication::boardController->controlView()->viewport() &&
!isSelected() && toPlainText().isEmpty())
if (widget == UBApplication::boardController->controlView()->viewport() && !isSelected())
{
setTextInteractionFlags(Qt::NoTextInteraction);
if (toPlainText().isEmpty())
{
painter->setFont(font());
painter->setPen(UBSettings::paletteColor);
painter->drawText(boundingRect(), Qt::AlignCenter, mTypeTextHereLabel);
setTextInteractionFlags(Qt::NoTextInteraction);
}
}
Delegate()->postpaint(painter, option, widget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment