修复action的对钩问题
This commit is contained in:
parent
6ab330418e
commit
911cca5373
|
@ -42,6 +42,7 @@ urlSourcesList = [
|
||||||
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
|
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
|
||||||
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
|
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
|
||||||
]
|
]
|
||||||
|
urlSourcesIndex = 0
|
||||||
urlSources = urlSourcesList[0]
|
urlSources = urlSourcesList[0]
|
||||||
lists = []
|
lists = []
|
||||||
|
|
||||||
|
@ -522,6 +523,7 @@ def readtxt(path):
|
||||||
|
|
||||||
def ChangeSources():
|
def ChangeSources():
|
||||||
global urlSources
|
global urlSources
|
||||||
|
global urlSourcesIndex
|
||||||
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
||||||
for i in range(0, len(sources)):
|
for i in range(0, len(sources)):
|
||||||
if sources[i].isChecked():
|
if sources[i].isChecked():
|
||||||
|
@ -535,7 +537,9 @@ def ChangeSources():
|
||||||
for i in lists:
|
for i in lists:
|
||||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||||
ui.searchList.setModel(nmodel)
|
ui.searchList.setModel(nmodel)
|
||||||
|
urlSourcesIndex = i
|
||||||
except:
|
except:
|
||||||
|
[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||||
break
|
break
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue