forked from qt-creator/qt-creator
LSP: Robustify open documents
Use Client::openDocument if you just want to open a document and activate it if it is not already used in another client. Use LanguageClientManager::openDocumentWithClient if you want to make sure a document is opened _and_ activated for a specific client. Change-Id: I6b790f15e17335ce2dc8981a04d2cd571b22b66b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -231,7 +231,7 @@ void updateEditorToolBar(Core::IEditor *editor)
|
||||
auto reopen = [action, client = QPointer<Client>(client), document]() {
|
||||
if (!client)
|
||||
return;
|
||||
LanguageClientManager::reOpenDocumentWithClient(document, client);
|
||||
LanguageClientManager::openDocumentWithClient(document, client);
|
||||
action->setChecked(true);
|
||||
};
|
||||
action->setCheckable(true);
|
||||
|
||||
Reference in New Issue
Block a user