Ask to retry download or configure installs if MC download fails
This commit is contained in:
parent
446c4de243
commit
ac42eae1a8
@ -209,18 +209,37 @@ class MCInstallGroup(QtCore.QObject):
|
|||||||
:return:
|
:return:
|
||||||
:rtype:
|
:rtype:
|
||||||
"""
|
"""
|
||||||
|
while True:
|
||||||
requiredVersion = self.findVersionWithAssets()
|
requiredVersion = self.findVersionWithAssets()
|
||||||
if not requiredVersion:
|
if not requiredVersion:
|
||||||
self.downloadVersionWithAssets()
|
self.downloadVersionWithAssets()
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
requiredVersion = self.findVersionWithAssets()
|
||||||
|
if not requiredVersion:
|
||||||
|
|
||||||
# msgBox = QtGui.QMessageBox()
|
msgBox = QtGui.QMessageBox()
|
||||||
# msgBox.setWindowTitle("Minecraft not found.")
|
msgBox.setWindowTitle("Minecraft not found.")
|
||||||
# msgBox.setText("MCEdit requires an installed Minecraft version 1.9 or greater to "
|
msgBox.setText("MCEdit requires an installed Minecraft version 1.9 or greater to "
|
||||||
# "access block textures, models, and metadata.")
|
"access block textures, models, and metadata.")
|
||||||
#
|
|
||||||
# msgBox.exec_()
|
download = msgBox.addButton(self.tr("Download Minecraft"), QtGui.QMessageBox.AcceptRole)
|
||||||
# installsWidget = MinecraftInstallsDialog()
|
configure = msgBox.addButton(self.tr("Configure Installs"), QtGui.QMessageBox.ActionRole)
|
||||||
# installsWidget.exec_()
|
exit_ = msgBox.addButton(self.tr("Exit MCEdit"), QtGui.QMessageBox.RejectRole)
|
||||||
|
|
||||||
|
msgBox.exec_()
|
||||||
|
result = msgBox.clickedButton()
|
||||||
|
log.info("Result: %s", result)
|
||||||
|
if result == download:
|
||||||
|
continue
|
||||||
|
if result == configure:
|
||||||
|
installsWidget = MinecraftInstallsDialog()
|
||||||
|
installsWidget.exec_()
|
||||||
|
continue
|
||||||
|
if result == exit_:
|
||||||
|
raise SystemExit
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mmcInstalls(self):
|
def mmcInstalls(self):
|
||||||
|
Reference in New Issue
Block a user