From 25ac141e12e874fc4c258eadab04aa930914f6d6 Mon Sep 17 00:00:00 2001 From: Pokey Rule Date: Fri, 10 Dec 2021 18:03:13 +0000 Subject: [PATCH] Merge scope types in cheatsheet --- src/cheat_sheet.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/cheat_sheet.py b/src/cheat_sheet.py index f6ca6d32..6fe1b4ef 100644 --- a/src/cheat_sheet.py +++ b/src/cheat_sheet.py @@ -151,8 +151,12 @@ def draw(self, canvas): self.draw_items(canvas, actions_2) self.next_column(canvas) - all_scopes = get_list("scope_type", {"argumentOrParameter": "Argument"}) - scopes_limit = len(all_scopes) - 3 + all_scopes = { + **get_list("scope_type", {"argumentOrParameter": "Argument"}), + **get_list("selection_type"), + **get_list("subtoken_scope_type"), + } + scopes_limit = 24 scopes_1 = slice_dict(all_scopes, 0, scopes_limit) scopes_2 = slice_dict(all_scopes, scopes_limit) @@ -164,14 +168,6 @@ def draw(self, canvas): self.draw_header(canvas, "More scopes") self.draw_items(canvas, scopes_2) - self.next_row() - self.draw_header(canvas, "Selection types") - self.draw_items(canvas, get_list("selection_type")) - - self.next_row() - self.draw_header(canvas, "Subtokens") - self.draw_items(canvas, get_list("subtoken_scope_type")) - self.next_row() self.draw_header(canvas, "Positions") self.draw_items(canvas, get_list("position"))