From d51af63d51a57c3e57196e2d08ac44080eb18e1a Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 1 Apr 2008 06:15:02 +0000 Subject: [PATCH] added QTextCursor for color, fixed color cursor problem when color is selected and cursor is not aktive git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@457 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/PopupChatDialog.cpp | 10 +--------- retroshare-gui/src/gui/chat/PopupChatDialog.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 24d35c7bc..85b687213 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -293,6 +293,7 @@ void PopupChatDialog::setColor() colorChanged(currentColor); } ui.chattextEdit->setFocus(); + QTextCursor cursor = ui.chattextEdit->textCursor(); } void PopupChatDialog::colorChanged(const QColor &c) @@ -302,15 +303,6 @@ void PopupChatDialog::colorChanged(const QColor &c) ui.colorButton->setIcon(pix); } -void PopupChatDialog::mergeFormatOnWordOrSelection(const QTextCharFormat &format) -{ - //QTextCursor cursor = ui.chattextEdit->textCursor(); - /*if (!cursor.hasSelection()) - cursor.select(QTextCursor::WordUnderCursor); - cursor.mergeCharFormat(format);*/ - //ui.chattextEdit->mergeCurrentCharFormat(format); -} - void PopupChatDialog::getFont() { bool ok; diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.h b/retroshare-gui/src/gui/chat/PopupChatDialog.h index 195a259df..bd25c2be3 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.h +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.h @@ -80,7 +80,6 @@ private slots: private: - void mergeFormatOnWordOrSelection(const QTextCharFormat &format); void colorChanged(const QColor &c); QAction *actionTextBold;