Skip to content

Commit

Permalink
fix: [codegeex] incorret references button state
Browse files Browse the repository at this point in the history
Log: as title
  • Loading branch information
LiHua000 committed Aug 2, 2024
1 parent 4d2d6ba commit b86d7b6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/plugins/codegeex/widgets/askpagewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,24 @@ void AskPageWidget::initReferenceMenu()
connect(current, &QAction::triggered, this, [=](){
selectedFiles.clear();
auto file = editorSrv->currentFile();
if (!file.isEmpty())
if (file.isEmpty())
current->setChecked(false);
else
selectedFiles.append(file);
});
connect(opened, &QAction::triggered, this, [=](){
selectedFiles.clear();
selectedFiles = editorSrv->openedFiles();
if (selectedFiles.isEmpty())
opened->setChecked(false);
});
connect(select, &QAction::triggered, this, [=](){
selectedFiles.clear();
QString result = QFileDialog::getOpenFileName(this, tr("Select File"), QDir::homePath());
selectedFiles.append(result);
if (result.isEmpty())
select->setChecked(false);
else
selectedFiles.append(result);
});
connect(clear, &QAction::triggered, this, [=](){
selectedFiles.clear();
Expand Down

0 comments on commit b86d7b6

Please sign in to comment.