| 389 | } |
| 390 | |
| 391 | void |
| 392 | FindNodeDialog::selectNextResult() |
| 393 | { |
| 394 | if ( _imp->currentFindIndex >= (int)( _imp->nodeResults.size() ) ) { |
| 395 | _imp->currentFindIndex = 0; |
| 396 | } |
| 397 | |
| 398 | _imp->buttons->setEnabled(_imp->nodeResults.size() > 1); |
| 399 | |
| 400 | if ( _imp->nodeResults.empty() ) { |
| 401 | return; |
| 402 | } |
| 403 | |
| 404 | NodesGuiList::iterator it = _imp->nodeResults.begin(); |
| 405 | std::advance(it, _imp->currentFindIndex); |
| 406 | |
| 407 | _imp->graph->selectNode(*it, false); |
| 408 | _imp->graph->centerOnItem( it->get() ); |
| 409 | |
| 410 | |
| 411 | QString text = QString::fromUtf8("Selecting result %1 of %2").arg(_imp->currentFindIndex + 1).arg( _imp->nodeResults.size() ); |
| 412 | _imp->resultLabel->setText(text); |
| 413 | |
| 414 | |
| 415 | ++_imp->currentFindIndex; |
| 416 | } |
| 417 | |
| 418 | void |
| 419 | FindNodeDialog::updateFindResultsWithCurrentFilter() |
nothing calls this directly
no test coverage detected