+
+void VoglEditor::on_searchTextBox_returnPressed()
+{
+ if (m_pApicallTreeModel != NULL)
+ {
+ QModelIndex index = m_pApicallTreeModel->find_next_search_result(m_pCurrentCallTreeItem, ui->searchTextBox->text());
+ if (index.isValid())
+ {
+ // a valid item was found, scroll to it and select it
+ selectApicallModelIndex(index, true, true);
+ }
+ else
+ {
+ // no items were found, so set the textbox background to red (it will get cleared to the original color if the user edits the search text)
+ QPalette palette(ui->searchTextBox->palette());
+ palette.setColor(QPalette::Base, Qt::red);
+ ui->searchTextBox->setPalette(palette);
+ }
+ }
+}