summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-07-26 19:42:53 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-07-26 19:42:53 (GMT)
commit6f26d9aa86f0909af13b23b1a925b8d492e74154 (patch)
tree607c2af594102e63cb7a263e01867eb39329a7be /Swift/Controllers/Chat/ChatControllerBase.cpp
parent279cb1e98855e681e09e4215608083413454a0f6 (diff)
downloadswift-contrib-6f26d9aa86f0909af13b23b1a925b8d492e74154.zip
swift-contrib-6f26d9aa86f0909af13b23b1a925b8d492e74154.tar.bz2
Don't let correction change a label.
Resolves: #1144
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index bc9c14e..2bfff4f 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -124,7 +124,10 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool
message->setType(Swift::Message::Chat);
message->setBody(body);
if (labelsEnabled_) {
- SecurityLabelsCatalog::Item labelItem = chatWindow_->getSelectedSecurityLabel();
+ if (!isCorrectionMessage) {
+ lastLabel_ = chatWindow_->getSelectedSecurityLabel();
+ }
+ SecurityLabelsCatalog::Item labelItem = lastLabel_;
if (labelItem.getLabel()) {
message->addPayload(labelItem.getLabel());
}