projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix parents for all dialog windows
[quassel.git]
/
src
/
qtui
/
topicwidget.cpp
diff --git
a/src/qtui/topicwidget.cpp
b/src/qtui/topicwidget.cpp
index
ff3ce65
..
336b902
100644
(file)
--- a/
src/qtui/topicwidget.cpp
+++ b/
src/qtui/topicwidget.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
19
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-152,13
+152,17
@@
void TopicWidget::setTopic(const QModelIndex& index)
}
}
}
}
- _topic = sanitizeTopic(newtopic);
- _readonly = readonly;
+ QString sanitizedNewTopic = sanitizeTopic(newtopic);
+ if (readonly != _readonly || sanitizedNewTopic != _topic)
+ {
+ _topic = sanitizedNewTopic;
+ _readonly = readonly;
- ui.topicEditButton->setVisible(!_readonly);
- ui.topicLabel->setText(_topic);
- ui.topicLineEdit->setPlainText(_topic);
- switchPlain();
+ ui.topicEditButton->setVisible(!_readonly);
+ ui.topicLabel->setText(_topic);
+ ui.topicLineEdit->setPlainText(_topic);
+ switchPlain();
+ }
}
void TopicWidget::setReadOnly(const bool& readonly)
}
void TopicWidget::setReadOnly(const bool& readonly)