mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
User can now select what strategy to use per conflict
CURA-1263
This commit is contained in:
parent
47d0e95e53
commit
f0eb5e0da3
3 changed files with 154 additions and 33 deletions
|
@ -82,17 +82,23 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
|
||||
if machine_conflict or quality_changes_conflict:
|
||||
# There is a conflict; User should choose to either update the existing data, add everything as new data or abort
|
||||
self._resolve_strategies = {}
|
||||
self._dialog.setMachineConflict(machine_conflict)
|
||||
self._dialog.setQualityChangesConflict(quality_changes_conflict)
|
||||
self._dialog.show()
|
||||
self._dialog.waitForClose()
|
||||
if self._dialog.getResult() == "cancel":
|
||||
if self._dialog.getResult() == {}:
|
||||
return WorkspaceReader.PreReadResult.cancelled
|
||||
result = self._dialog.getResult()
|
||||
# If there is no conflict, ignore the data.
|
||||
print("beep", result)
|
||||
if not machine_conflict:
|
||||
result["machine"] = None
|
||||
if not quality_changes_conflict:
|
||||
result["quality_changes"] = None
|
||||
|
||||
if machine_conflict:
|
||||
self._resolve_strategies["machine"] = result
|
||||
if quality_changes_conflict:
|
||||
self._resolve_strategies["quality_changes"] = result
|
||||
|
||||
self._resolve_strategies = result
|
||||
print("STRATEGY WAS", self._resolve_strategies)
|
||||
|
||||
return WorkspaceReader.PreReadResult.accepted
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue