Commit aad64e1f authored by Alex Neundorf's avatar Alex Neundorf

-don't let the user tab out of the search plugin

forward: go from the displayOptions to the result tree
backward: go from the tree to display options

Alex
parent b79883de
......@@ -172,25 +172,45 @@ void KatePluginSearchView::nextFocus(QWidget *currentWidget, bool *found, bool n
*found = true;
return;
}
if ((currentWidget == m_ui.displayOptions) && m_ui.displayOptions->isChecked()) {
m_ui.newTabButton->setFocus();
*found = true;
return;
if (currentWidget == m_ui.displayOptions) {
if (m_ui.displayOptions->isChecked()) {
m_ui.newTabButton->setFocus();
*found = true;
return;
}
else {
Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (!res) {
return;
}
res->tree->setFocus();
*found = true;
return;
}
}
}
else if (currentWidget == m_ui.newTabButton) {
if(m_ui.displayOptions->isChecked()) {
m_ui.displayOptions->setFocus();
else {
if (currentWidget == m_ui.newTabButton) {
if(m_ui.displayOptions->isChecked()) {
m_ui.displayOptions->setFocus();
}
else {
Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (!res) {
return;
}
res->tree->setFocus();
}
*found = true;
return;
}
else {
Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (!res) {
if (currentWidget->objectName() == "tree") {
m_ui.displayOptions->setFocus();
*found = true;
return;
}
res->tree->setFocus();
}
*found = true;
return;
}
}
......
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