From ea2c90011abf08535255720b577b28e5a918c277 Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Fri, 12 Feb 2021 18:40:52 +0200 Subject: [PATCH] Library: exit search mode before creating a folder Creating a folder in search mode selects it and makes the UI look half-way between Normal and Searching navigation statuses. An alternative fix is to disable addFolderAction in search mode. But this is more difficult to implement and inconsistent with the other always-enabled folder and reading list actions. --- YACReaderLibrary/library_window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index ce531308..4c905c06 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -1572,6 +1572,8 @@ void LibraryWindow::enableNeededActions() void LibraryWindow::addFolderToCurrentIndex() { + exitSearchMode(); // Creating a folder in search mode is broken => exit it. + QModelIndex currentIndex = getCurrentFolderIndex(); bool ok;