Skip to content

Commit 21279aa

Browse files
committed
Reset change count when loading radar
Previously if you started to dup a radar, we filled in all the fields in the window, which sets the document change count to edited. Then if you closed the window, you would be prompted to save the document. In this case where you haven't edited anything, the document will be immediately closable and you will only be prompted to save the document if you make changes to it.
1 parent 56bbb7a commit 21279aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Brisk/Controllers/RadarViewController.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ final class RadarViewController: ViewController {
8989
self.attachments = radar.attachments
9090

9191
self.enableSubmitIfValid()
92+
self.document?.updateChangeCount(.changeCleared)
9293
}
9394

9495
func currentRadar() -> Radar {
@@ -207,7 +208,7 @@ final class RadarViewController: ViewController {
207208
self.document?.save(self)
208209
}
209210

210-
self.view.window?.close()
211+
self.document?.close()
211212
}
212213
}
213214

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
## Bug Fixes
88

9-
- None.
9+
- Don't register dup'd radars as dirty files
10+
[change](https://github.com/br1sk/brisk/pull/103)
1011

1112
# 1.0.1
1213

0 commit comments

Comments
 (0)