Skip to content

chore: misc non-range cleanup#500

Open
FelipeDefensor wants to merge 12 commits into
devfrom
cleanup/misc-non-range
Open

chore: misc non-range cleanup#500
FelipeDefensor wants to merge 12 commits into
devfrom
cleanup/misc-non-range

Conversation

@FelipeDefensor

@FelipeDefensor FelipeDefensor commented May 3, 2026

Copy link
Copy Markdown
Collaborator

12 commits with small fixes/improvements. Including:

  • refactor: return success from App.on_open
  • fix: inheritance/menu-name, typing
  • chore: take path parameter to file.save_as command
  • chore: pass y argument to timelines context menus
  • feat: skip QGraphicsItems with ignore_right_click=True on right click
  • fix: rename "Set name" timeline action to "Set timeline name"
  • chore: tidy debug print and GetComponentDataError message
  • fix: avoid invalid-return-value error when set_timeline_data is a no-op
  • fix: block widget signals during programmatic value updates
  • feat: rename and relocate "Move timeline up/down"
  • test: cover slider click + drag-release seeking media

@FelipeDefensor FelipeDefensor added this to the 0.7.0 milestone May 4, 2026
@FelipeDefensor FelipeDefensor force-pushed the cleanup/misc-non-range branch from 8c2a607 to 2665403 Compare May 4, 2026 17:28
Comment thread TESTING.md Outdated
@FelipeDefensor FelipeDefensor force-pushed the cleanup/misc-non-range branch from 2665403 to 4c9267a Compare May 4, 2026 17:47
@FelipeDefensor FelipeDefensor requested a review from azfoo May 4, 2026 17:52
@FelipeDefensor FelipeDefensor marked this pull request as ready for review May 4, 2026 17:52
So that an overlapping item set as transparent to right clicks doesn't
intercept the context menu of an underlying item.
Clearer label — "Set name" was ambiguous about what was being named.
- Remove leftover `print(name)` from `_setup_commands` that was logging
  every timeline kind on app startup.
- Add missing space after the period in `GetComponentDataError`'s
  "Does ... have a ... attribute?" suffix.
set_timeline_data returned None when the new value matched the current
value, which made on_timeline_command's return-value validator surface
an "Invalid return values for command" dialog (e.g. setting row height
to its current value via the dialog). Return False in the no-op path
so the command flow treats it like cancel — bool, no undo record.
The Inspector's set_widget_value calls setText / setValue /
setCurrentIndex programmatically when re-displaying values from the
inspected_objects_stack (e.g. during a deselect cascade). These
fire textChanged / valueChanged / currentIndexChanged, which the
inspector connects to its on_*_changed handlers that post
INSPECTOR_FIELD_EDITED with the stale snapshot value. The
still-selected element's listener interprets that as a user edit
and writes the snapshot value back to the component.

The result: any programmatic change to an inspectable field is
silently reverted whenever a multi-selected element is deselected
while the inspector is open.
Move-up/move-down sit with the rest of the per-timeline actions in
the top section of the context menu now (previously below a leading
separator), and use the unambiguous "Move timeline up" / "Move
timeline down" labels. Applies to every timeline kind since the
base class drives this; the new label is clearer everywhere.
Adds two regression tests:
- `test_slider_drag_release_seeks_media`: drag the trough and assert
  MEDIA_CURRENT_TIME advances on release (the bug fixed in 5c5ffc7).
- `test_slider_click_seeks_media`: pin the click-to-seek path so a
  refactor can't silently break both at once.
]

def __init__(self, timeline_ui):
def __init__(self, timeline_ui: TimelineUI, x: int, y: int):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am I right to assume that this actually gets used somewhere later on?

items = [
item
for item in self.items(event.pos())
if not getattr(item, "ignore_right_click", False)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what has the attribute "ignore_right_click"?

@azfoo azfoo force-pushed the cleanup/misc-non-range branch from 4c9267a to 0814d09 Compare June 2, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants