This commit is contained in:
Martin Rotter 2020-12-15 10:07:21 +01:00
parent b005f969bc
commit a8da850c8f
2 changed files with 7 additions and 4 deletions

View File

@ -102,10 +102,15 @@ void MessagePreviewer::hideToolbar() {
}
void MessagePreviewer::loadMessage(const Message& message, RootItem* root) {
m_verticalScrollBarPosition = m_txtMessage->verticalScrollBarPosition();
bool same_message = message.m_id == m_message.m_id && m_root == root;
if (same_message) {
m_verticalScrollBarPosition = m_txtMessage->verticalScrollBarPosition();
}
else {
m_verticalScrollBarPosition = 0.0;
}
m_message = message;
m_root = root;

View File

@ -465,8 +465,6 @@ void MessagesView::deleteSelectedMessages() {
if (current_index.isValid()) {
setCurrentIndex(current_index);
emit currentMessageChanged(m_sourceModel->messageAt(m_proxyModel->mapToSource(current_index).row()), m_sourceModel->loadedItem());
}
else {
emit currentMessageRemoved();