Commit 1e6379ad authored by 曹高翔's avatar 曹高翔
Browse files

现在当题目详情页面已选中提交语言时,提交代码时会自动选中相同的语言

parent fd189f2d
......@@ -693,8 +693,11 @@ def SubmitCode(lang: str, code: str):
def SubmitInit():
languages = [toDisplay[lang] for lang in variables["exerciseInfo"]["supportedLanguages"]]
uiMain.comboBoxLanguageSubmit.clear()
uiMain.comboBoxLanguageSubmit.addItem("请选择提交语言")
if uiMain.comboBoxLanguage.currentText() == '请选择提交语言':
uiMain.comboBoxLanguageSubmit.addItem('请选择提交语言')
uiMain.comboBoxLanguageSubmit.addItems(languages)
if uiMain.comboBoxLanguage.currentText() != '请选择提交语言':
uiMain.comboBoxLanguageSubmit.setCurrentIndex(uiMain.comboBoxLanguage.currentIndex() - 1)
uiMain.frameQuestion.hide()
uiMain.frameSubmit.show()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment