Skip to content

Commit

Permalink
TableEditor: initialise events with is_event=True (#2041)
Browse files Browse the repository at this point in the history
Initialise Events in Qt TableEditor with `is_event=True` in order to avoid an error in "sync_value"
  • Loading branch information
Nino Ceresa authored Jan 16, 2024
1 parent a00f0c3 commit b728d60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions traitsui/qt/table_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,16 @@ def init(self, parent):

# Set up the required externally synchronized traits
is_list = mode in ("rows", "columns", "cells")
self.sync_value(factory.click, "click", "to")
self.sync_value(factory.dclick, "dclick", "to")
self.sync_value(factory.click, "click", "to", is_event=True)
self.sync_value(factory.dclick, "dclick", "to", is_event=True)
self.sync_value(factory.columns_name, "columns", is_list=True)
self.sync_value(factory.selected, "selected", is_list=is_list)
self.sync_value(
factory.selected_indices, "selected_indices", is_list=is_list
)
self.sync_value(factory.filter_name, "filter", "from")
self.sync_value(factory.filtered_indices, "filtered_indices", "to")
self.sync_value(factory.update_filter_name, "update_filter", "from")
self.sync_value(factory.update_filter_name, "update_filter", "from", is_event=True)

self.auto_size = self.factory.auto_size

Expand Down

0 comments on commit b728d60

Please sign in to comment.