Commit 8f5c30e5 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Search addon: don't show the folder options for every new tab

Only show them folder options the first time the toolview is used/opened,
to tell new users that it exists ...etc.

However for subsequent usage, e.g. you select some text and use "Search in
files (in new tab)", show the results view directly, otherwise you have to
hide the folder options widget every time.
parent a69004b4
Pipeline #197439 passed with stage
in 4 minutes and 31 seconds
......@@ -1998,12 +1998,12 @@ void KatePluginSearchView::addTab()
m_tabBar->addTab(QString());
m_tabBar->setCurrentIndex(m_tabBar->count() - 1);
m_ui.stackedWidget->setCurrentIndex(0);
if (res->searchPlaceIndex < MatchModel::Folder) {
m_ui.displayOptions->setChecked(false);
res->displayFolderOptions = false;
} else {
m_ui.displayOptions->setChecked(true);
res->displayFolderOptions = true;
// Don't show folder options widget for every new tab
if (m_tabBar->count() == 1) {
const bool showFolderOpts = res->searchPlaceIndex < MatchModel::Folder;
m_ui.displayOptions->setChecked(showFolderOpts);
res->displayFolderOptions = showFolderOpts;
}
res->treeView->installEventFilter(this);
......
Supports Markdown
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