Commit e161e0cc authored by Yves Reker's avatar Yves Reker

bugfixing

parent ae6e291e
......@@ -86,8 +86,15 @@ class CaffeVersionWidget(QWidget):
def _onRemoveVersion(self):
"""Remove this version from the caffe_version_manager"""
self.versionManager._onRemoveVersion(self.caffe_version.getName(), self.host)
self.restartWarning()
if self.host == None:
self.restartWarning()
else:
msgBox = QMessageBox(QMessageBox.Warning, "Warning", "Please restart Barista host for changes to apply, otherwise Barista may be unstable!")
msgBox.addButton("Ok", QMessageBox.NoRole)
msgBox.addButton("Restart now", QMessageBox.YesRole)
if msgBox.exec_() == 1:
msg = {"key": Protocol.RESTART, "pid": self.versionManager.project.getProjectId()}
sendMsgToHost(self.host.host, self.host.port, msg)
def _onSetCurrent(self):
"""Sets this version as the current projects/remote hosts caffe version"""
if self.host == None:
......@@ -97,7 +104,7 @@ class CaffeVersionWidget(QWidget):
msg = {"key": Protocol.SETCURRENTCAFFEVERSION, "versionname": self.caffe_version.getName()}
sendMsgToHost(self.host.host, self.host.port, msg)
msgBox = QMessageBox(QMessageBox.Warning, "Warning", "Please restart Barista client for changes to apply, otherwise Barista may be unstable!")
msgBox = QMessageBox(QMessageBox.Warning, "Warning", "Please restart Barista host for changes to apply, otherwise Barista may be unstable!")
msgBox.addButton("Ok", QMessageBox.NoRole)
msgBox.addButton("Restart now", QMessageBox.YesRole)
if msgBox.exec_() == 1:
......
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