From 02ad9ef6c1e4523d0a3bcc034408fa6967233449 Mon Sep 17 00:00:00 2001 From: dam Date: Thu, 10 Feb 2022 09:36:57 +0000 Subject: Sort option sets alphabetically. --- logic/database.gd | 3 ++- logic/stage.gd | 1 + readme.md | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/logic/database.gd b/logic/database.gd index 7b05932..e14dba4 100644 --- a/logic/database.gd +++ b/logic/database.gd @@ -18,7 +18,6 @@ func _init(): selected_idx = -1 staged_idx = -1 load_database() - store_database() # @DAM Only for testing. func _ready(): @@ -34,6 +33,8 @@ func _ready(): for it in db: self.add_item(get_entry_view(it)) + + clear_selection() func _notification(what: int): diff --git a/logic/stage.gd b/logic/stage.gd index 6f46489..66d6d6d 100644 --- a/logic/stage.gd +++ b/logic/stage.gd @@ -85,6 +85,7 @@ func get_option_sets(field: String): if options.size() == 0: options.append(OPTION_SETS_NOT_AVAILABLE) + options.sort() return options diff --git a/readme.md b/readme.md index 549bbf4..c9117e9 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,7 @@ Surgery Log - [x] add pop-up asking if changes are to be discarded once the stage screen's discard button is pressed; - [x] add pop-up confirming delete-entry action; - [x] edit and delete action buttons should be faded-out when no entry is selected; +- [x] Sort option sets alphabetically; - [ ] Implement file access permission check on Android: ```py if OS.get_name() == "Android": -- cgit v1.2.3