chat-dialog: fix gui bug when changing routing prefix
Change-Id: I7029856fe1a3f1c40f2650008a7ceb6ad2b9dfec
Refs: #2484
diff --git a/src/chat-dialog-backend.cpp b/src/chat-dialog-backend.cpp
index 1ea25ac..354b9bd 100644
--- a/src/chat-dialog-backend.cpp
+++ b/src/chat-dialog-backend.cpp
@@ -485,14 +485,14 @@
// Update localPrefix
m_localRoutingPrefix = newLocalRoutingPrefix;
- updatePrefixes();
-
m_mutex.lock();
m_shouldResume = true;
m_mutex.unlock();
close();
+ updatePrefixes();
+
m_face->getIoService().stop();
}
}
diff --git a/src/chat-dialog.cpp b/src/chat-dialog.cpp
index 4d50054..e993294 100644
--- a/src/chat-dialog.cpp
+++ b/src/chat-dialog.cpp
@@ -341,6 +341,7 @@
appendControlMessage(nick, "enters room", timestamp);
m_scene->updateNick(sessionPrefix, nick);
m_rosterModel->setStringList(m_scene->getRosterList());
+ fitView();
}
void
@@ -349,6 +350,7 @@
appendControlMessage(nick, "leaves room", timestamp);
m_scene->removeNode(sessionPrefix);
m_rosterModel->setStringList(m_scene->getRosterList());
+ fitView();
}
void
@@ -393,6 +395,7 @@
"QLabel {color: Green; font-size: 12px; font: bold \"Verdana\";}");
}
ui->prefixLabel->setText(chatPrefix);
+ fitView();
}
void