Skip to content

Commit

Permalink
Cleanuo
Browse files Browse the repository at this point in the history
  • Loading branch information
jordantgh committed Dec 19, 2023
1 parent a568a9e commit 5678318
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ def add_tag(self, tag: 'str'):
self.curr_elems.tags_display_widget.clear()
for tag in self.model.last_selected_table.get_tags():
self.curr_elems.tags_display_widget.addTag(tag)
# self.curr_elems.tags_display_widget.update()

def remove_tag(self, tag: 'str'):
self.model.last_selected_table.remove_tag(tag)

# Refresh the tag display
self.curr_elems.tags_display_widget.clear()
for tag in self.model.last_selected_table.get_tags():
self.curr_elems.tags_display_widget.addTag(tag)
Expand Down Expand Up @@ -243,7 +241,7 @@ def load_preview(
self.view.stop_load_animation()

# The original signal emits two arguments, but this slot only takes one
# - why does this work? Granted, we don't need the context argument, but
# - why does this work? Granted, we don't *need* the context argument, but
# still, it doesn't make sense why this doesn't throw an error.
# TODO debug later
def request_suppfile_preview(self, file_data: 'SuppFile'):
Expand All @@ -264,7 +262,8 @@ def request_suppfile_preview(self, file_data: 'SuppFile'):
def preview_processed_table(
self, table: 'ProcessedTable', context: 'PageIdentity'
):
self.model.last_selected_table = table # hacky to do this here
# hacky to do this here, should have own method
self.model.last_selected_table = table
self.curr_elems.tags_display_widget.clear()
for tag in table.get_tags():
self.curr_elems.tags_display_widget.addTag(tag)
Expand Down

0 comments on commit 5678318

Please sign in to comment.