1
0
Fork 0

GUI: fixed annoying focus issue when source debugging is enabled

This commit is contained in:
mrexodia 2017-05-27 01:41:11 +02:00
parent 9944334614
commit 9ddfa87789
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 3 additions and 0 deletions

View File

@ -29,8 +29,11 @@ void SourceViewerManager::loadSourceFile(QString path, int line, int selection)
SourceView* curView = (SourceView*)this->widget(i);
if(curView->getSourcePath().compare(path, Qt::CaseInsensitive) == 0) //file already loaded
{
QWidget* now = QApplication::focusWidget();
curView->setSelection(line);
setCurrentIndex(i); //show that loaded tab
if(now)
now->setFocus();
return;
}
}