Skip to content

[WIP] v2.2.0 Clicking in plot window does not change frame.#2

Closed
Copilot wants to merge 1 commit into
masterfrom
copilot/fix-1
Closed

[WIP] v2.2.0 Clicking in plot window does not change frame.#2
Copilot wants to merge 1 commit into
masterfrom
copilot/fix-1

Conversation

Copy link
Copy Markdown

Copilot AI commented Jul 21, 2025

Analysis of Plot Window Click Issue

Investigated the v2.2.0 issue where clicking in the plot window does not change the frame. The issue is in the PlotWindow.cpp event handling logic.

Current Analysis

The problem is in the PlotWindow::eventFilter method around lines 1048-1062. When handling regular left mouse clicks (not Ctrl+click), the code:

  1. ✅ Correctly calculates the frame from mouse position
  2. ✅ Correctly calls State::getInstance()->changeActiveFrameTrial(frame)
  3. Missing: Does not update startFrame and endFrame variables
  4. Missing: Does not update noSelection flag

This causes the visual frame marker in the plot to not update properly even though the underlying frame state changes.

Implementation Plan

  • Analyze the current event handling logic in PlotWindow.cpp
  • Identify the missing startFrame/endFrame updates in regular click handler
  • Fix the regular left click handler to properly set startFrame/endFrame
  • Ensure noSelection flag is properly managed
  • Test the fix to verify clicking updates both frame state and visual indicators
  • Verify the fix doesn't break existing Ctrl+click selection functionality

Root Cause

The Ctrl+click handler (lines 1038-1040) properly sets:

startFrame = frame;
endFrame = frame; 
noSelection = true;

But the regular click handler (lines 1048-1062) is missing these assignments, causing visual inconsistencies.

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

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.

v2.2.0 Clicking in plot window does not change frame.

2 participants