summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKåre Särs <kare.sars@iki.fi>2016-07-20 08:04:06 (GMT)
committerKåre Särs <kare.sars@iki.fi>2016-07-20 08:04:06 (GMT)
commit87d3562dea0003d492fe1c8e2e697676b1f77693 (patch)
tree97c864920adbc3e7594dfcd30d591292d5f629f9
parent805a7fd40e4a6717d702a56259d7f84e5a7aede8 (diff)
S&R: Only open the folder options when search-place is "Folder"
-rw-r--r--addons/search/plugin_search.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/search/plugin_search.cpp b/addons/search/plugin_search.cpp
index d35e0ac..7160587 100644
--- a/addons/search/plugin_search.cpp
+++ b/addons/search/plugin_search.cpp
@@ -433,7 +433,9 @@ void KatePluginSearchView::openSearchView()
m_mainWindow->showToolView(m_toolView);
}
m_ui.searchCombo->setFocus(Qt::OtherFocusReason);
- m_ui.displayOptions->setChecked(true);
+ if (m_ui.searchPlaceCombo->currentIndex() == Folder) {
+ m_ui.displayOptions->setChecked(true);
+ }
KTextEditor::View* editView = m_mainWindow->activeView();
if (editView && editView->document()) {
@@ -595,10 +597,12 @@ void KatePluginSearchView::folderFileListChanged()
void KatePluginSearchView::searchPlaceChanged()
{
- m_ui.displayOptions->setChecked(true);
int searchPlace = m_ui.searchPlaceCombo->currentIndex();
const bool inFolder = (searchPlace == Folder);
+ if (inFolder) {
+ m_ui.displayOptions->setChecked(true);
+ }
m_ui.filterCombo->setEnabled(searchPlace >= Folder);
m_ui.excludeCombo->setEnabled(searchPlace >= Folder);
@@ -1668,6 +1672,7 @@ void KatePluginSearchView::readSessionConfig(const KConfigGroup &cg)
m_ui.excludeCombo->clear();
m_ui.excludeCombo->addItems(cg.readEntry("ExcludeFilters", QStringList()));
m_ui.excludeCombo->setCurrentIndex(cg.readEntry("CurrentExcludeFilter", 0));
+ m_ui.displayOptions->setChecked(searchPlaceIndex == Folder);
}
void KatePluginSearchView::writeSessionConfig(KConfigGroup &cg)