aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2022-02-10 09:36:57 +0000
committerdam <dam@gudinoff>2022-02-10 09:36:57 +0000
commit02ad9ef6c1e4523d0a3bcc034408fa6967233449 (patch)
tree06c5edae56197f71159896bd8f45a9e43eb0d812
parentbfa4fe480ecb9ba4f4ce69788362ba61ce2144c1 (diff)
downloadsurgery-log-02ad9ef6c1e4523d0a3bcc034408fa6967233449.tar.zst
surgery-log-02ad9ef6c1e4523d0a3bcc034408fa6967233449.zip
Sort option sets alphabetically.
-rw-r--r--logic/database.gd3
-rw-r--r--logic/stage.gd1
-rw-r--r--readme.md1
3 files changed, 4 insertions, 1 deletions
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":