make sure that newly enabled msg view column is not zero width

This commit is contained in:
Martin Rotter 2022-08-31 12:43:26 +02:00
parent 6e8841eacf
commit a555cd3224

View File

@ -2,6 +2,8 @@
#include "gui/reusable/treeviewcolumnsmenu.h"
#include "definitions/definitions.h"
#include <QHeaderView>
TreeViewColumnsMenu::TreeViewColumnsMenu(QHeaderView* parent) : NonClosableMenu(parent) {
@ -27,6 +29,10 @@ void TreeViewColumnsMenu::actionTriggered(bool toggle) {
header()->setSectionHidden(send_act->data().toInt(), !send_act->isChecked());
if (send_act->isChecked() && header()->sectionSize(send_act->data().toInt()) < 10) {
header()->resizeSection(send_act->data().toInt(), MESSAGES_VIEW_DEFAULT_COL);
}
Q_UNUSED(toggle)
}