projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bug in the new topic widget where no repaint event was triggered if only...
[quassel.git]
/
src
/
qtui
/
topicwidget.cpp
diff --git
a/src/qtui/topicwidget.cpp
b/src/qtui/topicwidget.cpp
index
8adb0b6
..
511d275
100644
(file)
--- a/
src/qtui/topicwidget.cpp
+++ b/
src/qtui/topicwidget.cpp
@@
-32,6
+32,10
@@
TopicWidget::TopicWidget(QWidget *parent)
}
void TopicWidget::setTopic(const QString &newtopic) {
}
void TopicWidget::setTopic(const QString &newtopic) {
+ if(_topic == newtopic)
+ return;
+
+ _topic = newtopic;
ui.topicButton->setAndStyleText(newtopic);
ui.topicLineEdit->setText(newtopic);
switchPlain();
ui.topicButton->setAndStyleText(newtopic);
ui.topicLineEdit->setText(newtopic);
switchPlain();
@@
-49,6
+53,7
@@
void TopicWidget::on_topicButton_clicked() {
void TopicWidget::switchEditable() {
ui.topicButton->hide();
ui.topicLineEdit->show();
void TopicWidget::switchEditable() {
ui.topicButton->hide();
ui.topicLineEdit->show();
+ ui.topicLineEdit->setFocus();
}
void TopicWidget::switchPlain() {
}
void TopicWidget::switchPlain() {
@@
-64,6
+69,7
@@
bool TopicWidget::eventFilter(QObject *obj, QEvent *event) {
if(keyEvent->key() == Qt::Key_Escape) {
switchPlain();
if(keyEvent->key() == Qt::Key_Escape) {
switchPlain();
+ ui.topicLineEdit->setText(_topic);
return true;
}
return true;
}