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

preferencesAboutTextFull
Clément Fauconnier 5 years ago
parent 87892b6e61
commit 8081ab134b
  1. 8
      src/domain/UBGraphicsTextItem.cpp

@ -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);

Loading…
Cancel
Save