fix: Compiler buttons not correctly disabled for non-c/c++ files

This commit is contained in:
Roy Qu 2022-12-16 18:31:48 +08:00
parent 68f4dcec3f
commit d2a2002629
1 changed files with 1 additions and 1 deletions

View File

@ -661,11 +661,11 @@ void MainWindow::updateCompileActions()
bool canCompile = false;
Editor * e = mEditorList->getEditor();
if (e) {
canCompile = true;
if (!e->inProject()) {
FileType fileType = getFileType(e->filename());
if (fileType == FileType::CSource
|| fileType == FileType::CppSource || e->isNew()) {
canCompile = true;
canRun = true;
}
} else {