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.
This commit is contained in:
Igor Kushnir 2021-02-12 18:40:52 +02:00 committed by Luis Ángel San Martín
parent 40ca07f8f8
commit ea2c90011a

View File

@ -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;