Commit 19670c5b authored by con's avatar con
Browse files

Fixes: - Crash on searching in "current project"

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.
parent be38c9b4
......@@ -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);
}
}
}
......
Markdown is supported
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