Fix PlotWidget moveTo/position resolving to empty EventInterface stubs#629
Conversation
PlotWidgetSuper inherits from both ItemT<PlotWidget> (via Item) and
RenderNativeWindow (via EventInterface). Both chains define moveTo()
and position(), but classdesc resolves to EventInterface's empty
implementations rather than Item's working ones.
This makes PlotWidget::moveTo() silently no-op via the REST API, and
position() always returns {0,0} — preventing programmatic positioning
of plot widgets.
Add explicit overrides in PlotWidget that delegate to Item::moveTo()
and Item::x()/y(), following the existing disambiguation pattern used
for width() and height().
Fixes tickets:#1918
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded explicit method overrides to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present. |
21994a2
into
highperformancecoder:master
Summary
PlotWidget::moveTo()andPlotWidget::position()called via the REST API resolve toEventInterface's empty implementations instead ofItem's working ones, due to diamond inheritance inPlotWidgetSuper.This makes it impossible to programmatically position PlotWidgets —
moveTo()silently no-ops andposition()always returns{0,0}.Fix
Add explicit overrides in
PlotWidgetthat delegate toItem::moveTo()andItem::x()/Item::y(), following the existing disambiguation pattern already used forwidth()andheight():Root Cause
PlotWidgetSuper(plotWidget.h:41) inherits from bothItemT<PlotWidget>andRenderNativeWindow:classdesc resolves to
EventInterface::moveTo(empty stub) rather thanItem::moveTo.Only
PlotWidgetis affected — variables/operations inherit fromItemT<>only, with noRenderNativeWindowin the chain.Fixes tickets:#1918
This change is
Summary by CodeRabbit