Pressing the discard button now actually discards the changes

CURA-3221
This commit is contained in:
Jaime van Kessel 2017-02-28 12:35:08 +01:00
parent 2462699982
commit 85b58c9296
3 changed files with 19 additions and 48 deletions

View file

@ -331,14 +331,17 @@ class CuraApplication(QtApplication):
showDiscardOrKeepProfileChanges = pyqtSignal()
def discardOrKeepProfileChanges(self, callback = None, callback_arguments = []):
self._discard_or_keep_changes_callback = callback
self._discard_or_keep_changes_callback_arguments = callback_arguments
def discardOrKeepProfileChanges(self):
self.showDiscardOrKeepProfileChanges.emit()
@pyqtSlot(int)
def discardOrKeepProfileChangesClosed(self, button):
pass
@pyqtSlot(str)
def discardOrKeepProfileChangesClosed(self, option):
if option == "discard":
global_stack = self.getGlobalContainerStack()
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
extruder.getTop().clear()
global_stack.getTop().clear()
@pyqtSlot(int)
def messageBoxClosed(self, button):