From 998efbd070f5af1c0cd963c3cbf29d744ee169b0 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Mon, 16 Jul 2012 09:08:12 +0300 Subject: [PATCH] SANKORE-604 "+" and "-" buttons does nothing if text item is empty. --- src/domain/UBGraphicsTextItemDelegate.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index 4b8a1910..e160869c 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -327,6 +327,11 @@ void UBGraphicsTextItemDelegate::ChangeTextSize(qreal factor, textChangeMode cha if (0 == factor) return; + UBGraphicsTextItem *item = dynamic_cast(delegated()); + + if (item && (QString() == item->toPlainText())) + return; + QTextCursor cursor = delegated()->textCursor(); QTextCharFormat textFormat;