Skip to content
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

[ui] Edge: Workaround on the Crash due to Edge Connections #2663

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

waaake
Copy link
Contributor

@waaake waaake commented Feb 3, 2025

Description

This PR addresses a crash issue by working around the issue of querying buttons for the MouseEvent.
MouseEvent::button() or MouseEvent::buttons() on the mousePressEvent or in the Custom MouseEvent was causing crashes some times when an event provided has issues.
While the underlying issues at this point are not clear, it is evident that the crash is happening due to the PySide binding.
A similar implementation was tested on the C++ side which seems to be working fine.

Features list

[X] Workaround for edge crashing by implementing a Mouse Area which checks the pressed point to exist on the edge before emitting a pressed/released event.

Implementation remarks

  • This PR introduces a MouseArea which follows the edge, any clicks on the mouse area checks if the point exists on the edgeArea, if so a relevant pressed/released event gets triggered, else the event is ignored.

Removed mousePress and mouseReleased events

Invoking custom Event or querying mouse buttons from the provided QMouseEvent crashes meshroom, this comes as first part of the workaround for querying when a point exists on the path
The workaround on edge crashing is to use the mouse area around the edge and query if the click exists in the edge to accept pressed or released signal
@waaake waaake self-assigned this Feb 3, 2025
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.95%. Comparing base (91885af) to head (efb13f1).
Report is 2 commits behind head on develop.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2663   +/-   ##
========================================
  Coverage    69.95%   69.95%           
========================================
  Files          122      122           
  Lines         7106     7106           
========================================
  Hits          4971     4971           
  Misses        2135     2135           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant