Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit fbfa271f authored by Laurent Montel's avatar Laurent Montel 😁

Patch from aleksejshilin

Previously, current message selection was saved only when switching
collections. As the result, selection changes were not always saved,
breaking the PreSelectLastSelected mode (which is the default one in
e.g. KMail).

This commit fixes the issue by saving current selection at tab close
and at Pane destruction (i.e. application exit).

Differential Revision: https://phabricator.kde.org/D10478
parent 25449978
......@@ -188,6 +188,7 @@ Pane::Pane(bool restoreSession, QAbstractItemModel *model, QItemSelectionModel *
Pane::~Pane()
{
saveCurrentSelection();
writeConfig(true);
delete d;
}
......@@ -606,6 +607,11 @@ void Pane::Private::closeTab(QWidget *w)
return;
}
Widget *wWidget = qobject_cast<Widget *>(w);
if (wWidget) {
wWidget->saveCurrentSelection();
}
delete w;
updateTabControls();
}
......@@ -692,6 +698,7 @@ void Pane::Private::onTabContextMenuRequest(const QPoint &pos)
}
foreach (Widget *other, widgets) {
other->saveCurrentSelection();
delete other;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment