From 620e9f77480d7872508229646952e7034a280135 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 11 Mar 2014 09:40:43 +0100 Subject: [PATCH] the QGraphicsTextItem should be focused in order to view the cursor --- src/domain/UBGraphicsTextItemDelegate.cpp | 1 + src/domain/UBGraphicsTextItemDelegate.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index ca3faa21..fe9f15bb 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -392,6 +392,7 @@ void UBGraphicsTextItemDelegate::alignButtonProcess() delegated()->setTextCursor(cur); cur.setBlockFormat(fmt); + delegated()->setFocus(); } qDebug() << "sender process" << sndr; diff --git a/src/domain/UBGraphicsTextItemDelegate.h b/src/domain/UBGraphicsTextItemDelegate.h index c303a28b..de07c738 100644 --- a/src/domain/UBGraphicsTextItemDelegate.h +++ b/src/domain/UBGraphicsTextItemDelegate.h @@ -138,7 +138,6 @@ class UBGraphicsTextItemDelegate : public UBGraphicsItemDelegate DelegateButton* mColorButton; DelegateButton* mDecreaseSizeButton; DelegateButton* mIncreaseSizeButton; - DelegateButton* mAlignButton; int mLastFontPixelSize;