From 19670c5bebc09804ae43520492234f390773259f Mon Sep 17 00:00:00 2001 From: con Date: Tue, 10 Feb 2009 12:13:45 +0100 Subject: [PATCH] Fixes: - Crash on searching in "current project" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task: - 243147 RevBy: - Thorbjørn Details: - Crash occurred in case there actually is no "current project", e.g. because the current file doesn't appear in a project. --- src/plugins/find/findtoolwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/find/findtoolwindow.cpp b/src/plugins/find/findtoolwindow.cpp index f9f23d0668f..8330a02065c 100644 --- a/src/plugins/find/findtoolwindow.cpp +++ b/src/plugins/find/findtoolwindow.cpp @@ -104,10 +104,17 @@ void FindToolWindow::setCurrentFilter(int index) QWidget *configWidget = m_configWidgets.at(i); if (!configWidget) continue; - if (i == index) + if (i == index) { m_ui.configWidget->layout()->addWidget(configWidget); - else + bool enabled = m_filters.at(i)->isEnabled(); + m_ui.matchCase->setEnabled(enabled); + m_ui.wholeWords->setEnabled(enabled); + m_ui.searchTerm->setEnabled(enabled); + m_ui.searchButton->setEnabled(enabled); + configWidget->setEnabled(enabled); + } else { configWidget->setParent(0); + } } }