-
Notifications
You must be signed in to change notification settings - Fork 1
Fix timeline plot not updating on category change #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -123,6 +123,8 @@ def get_category_info(self): | |||||||||||||||
| """ | ||||||||||||||||
| category_list = [self.category_combobox.itemText(i) for i in range(self.category_combobox.count())] | ||||||||||||||||
| category_index = self.category_combobox.currentIndex() | ||||||||||||||||
| if category_index >=0 and category_index < len(category_list): | ||||||||||||||||
| self.data.update_category_list(category_list, category_index) | ||||||||||||||||
|
Comment on lines
+126
to
+127
|
||||||||||||||||
| if category_index >=0 and category_index < len(category_list): | |
| self.data.update_category_list(category_list, category_index) | |
| if 0 <= category_index < len(category_list): | |
| self.data.update_category_list(category_list, category_index) | |
| else: | |
| # No valid selection in the category combobox; clear category_info | |
| self.data.category_info = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated
custom_age_rangesschema usesList[List[Union[int, float]]], which allows ranges of arbitrary length, but downstream code assumes each range has exactly two elements (min,max). To fail fast on bad YAML, consider modeling each range as a fixed-length tuple (e.g.,Tuple[Union[int, float], Union[int, float]]) so Pydantic validates the structure and prevents runtimeIndexError/mislabeling later.