File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
GUI/src/main/kotlin/ui/components Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,6 @@ fun saveCollageCallback(
51
51
if (! savePath.endsWith(" .png" )) {
52
52
savePath = " $savePath .png"
53
53
}
54
- state.value = state.value.copy( saveCollagePath = savePath)
54
+ state.value. saveCollagePath = savePath
55
55
navigator.createCollage(savePath)
56
56
}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ fun saveInsertedFramesCallback(
65
65
return
66
66
}
67
67
}
68
- state.value = state.value.copy( saveInsertionsPath = savePath)
68
+ state.value. saveInsertionsPath = savePath
69
69
70
70
createInsertionsExport(savePath, navigator.getInsertedFrames())
71
71
}
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ fun handleOpenProject(
84
84
) {
85
85
val file = File (path).readLines()
86
86
state.value = JsonMapper .mapper.readValue<AppState >(file.joinToString(" " ))
87
- state.value = state.value.copy( openProjectPath = path)
87
+ state.value. openProjectPath = path
88
88
}
89
89
90
90
/* *
@@ -100,7 +100,8 @@ fun handleSaveProject(
100
100
if (! savePath.endsWith(" .json" )) {
101
101
savePath = " $savePath .json"
102
102
}
103
- state.value = state.value.copy(saveProjectPath = savePath)
103
+ state.value.saveProjectPath = savePath
104
+
104
105
val jsonData = JsonMapper .mapper.writeValueAsString(state.value)
105
106
File (savePath).writeText(jsonData)
106
107
}
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ private fun saveBitmapAsPng(
109
109
savePath = " $savePath .png"
110
110
}
111
111
// remember path for next time opening the file chooser
112
- state.value = state.value.copy( saveFramePath = savePath)
112
+ state.value. saveFramePath = savePath
113
113
val file = File (savePath)
114
114
if (file.exists()) {
115
115
val overwrite = showOverwriteConfirmation()
You can’t perform that action at this time.
0 commit comments