| 932 | } |
| 933 | |
| 934 | void UniversalLocator::updateSwitchFileTypeTable() { |
| 935 | mLocateTable->setModel( |
| 936 | openFileTypeModel( mLocateInput->getText().substr( 3 ).trim().toUtf8() ) ); |
| 937 | if ( mLocateTable->getModel()->hasChildren() && mApp->getSplitter()->getCurEditor() ) { |
| 938 | ModelIndex idx = mLocateTable->findRowWithText( mApp->getSplitter() |
| 939 | ->getCurEditor() |
| 940 | ->getDocumentRef() |
| 941 | ->getSyntaxDefinition() |
| 942 | .getLanguageName() ); |
| 943 | mLocateTable->setSelection( idx.isValid() ? idx : mLocateTable->getModel()->index( 0 ) ); |
| 944 | } else { |
| 945 | mLocateTable->scrollToTop(); |
| 946 | } |
| 947 | mLocateTable->setColumnsVisible( { 0 } ); |
| 948 | } |
| 949 | |
| 950 | void UniversalLocator::onCodeEditorFocusChange( UICodeEditor* editor ) { |
| 951 | if ( !mLocateTable || !mLocateTable->isVisible() ) |
nothing calls this directly
no test coverage detected