diff --git a/src/domain/UBGraphicsTextItem.cpp b/src/domain/UBGraphicsTextItem.cpp index f3bbbb12..7282eff9 100644 --- a/src/domain/UBGraphicsTextItem.cpp +++ b/src/domain/UBGraphicsTextItem.cpp @@ -246,9 +246,6 @@ void UBGraphicsTextItem::keyReleaseEvent(QKeyEvent *event) void UBGraphicsTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - QColor color = UBSettings::settings()->isDarkBackground() ? mColorOnDarkBackground : mColorOnLightBackground; - setDefaultTextColor(color); - // Never draw the rubber band, we draw our custom selection with the DelegateFrame QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option); styleOption.state &= ~QStyle::State_Selected; diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index 3d05f1c7..cc69d8e7 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -743,7 +743,7 @@ void UBGraphicsTextItemDelegate::recolor() //setting new parameters - if (UBSettings::settings()->isDarkBackground()) + if (delegated()->scene()->isDarkBackground()) { if (curBrush.color() == Qt::black) {