From 9636a11923672f99d2d4ffe9d574978be7a0f757 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sun, 12 Nov 2023 17:43:45 +0100 Subject: [PATCH] reset selection, because when a list item is selected and treeview is used, no restore is possible with the collapse counter we use --- src/ui/DoubleTreeWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/DoubleTreeWidget.cpp b/src/ui/DoubleTreeWidget.cpp index 025eb299..eb191a17 100644 --- a/src/ui/DoubleTreeWidget.cpp +++ b/src/ui/DoubleTreeWidget.cpp @@ -75,6 +75,8 @@ QAction *DoubleTreeWidget::setupAppearanceAction(const char *name, action->setChecked(Settings::instance()->value(id, defaultValue).toBool()); connect(action, &QAction::triggered, this, [this, id](bool checked) { Settings::instance()->setValue(id, checked); + mSelectedFile.filename = + ""; // When switching view, it is not possible to restore RepoView::parentView(this)->refresh(); }); return action;