MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / selectNextResult

Method selectNextResult

Gui/NodeGraph45.cpp:391–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void
392FindNodeDialog::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
418void
419FindNodeDialog::updateFindResultsWithCurrentFilter()

Callers

nothing calls this directly

Calls 8

emptyMethod · 0.80
sizeMethod · 0.45
setEnabledMethod · 0.45
beginMethod · 0.45
selectNodeMethod · 0.45
centerOnItemMethod · 0.45
getMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected