meerk40t / meerk40t

Hackable Laser software for K40 / GRBL / Fibre Lasers
MIT License
233 stars 62 forks source link

Allow limited selection on right click menu #2703

Closed jpirnay closed 6 days ago

jpirnay commented 6 days ago

grafik

Summary by Sourcery

Add a right-click context menu to the contour list, enabling users to perform selective deletion of contours. Refactor the code to separate the logic for populating the contour list, enhancing code clarity.

New Features:

Enhancements:

sourcery-ai[bot] commented 6 days ago

Reviewer's Guide by Sourcery

This PR adds right-click menu functionality to the contours list, allowing users to selectively delete contours based on various criteria. The implementation includes new event handling for right-clicks, menu creation with different deletion options, and improved visual feedback for selected contours.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added right-click menu functionality for selective contour deletion
  • Added event binding for right-click events
  • Implemented menu options to delete selected contour, all others, all bigger, or all smaller contours
  • Created helper functions to handle different deletion criteria
meerk40t/gui/propertypanels/imageproperty.py
Refactored contour list population logic
  • Extracted list population logic into a separate method
  • Updated refresh workflow to properly update the contour list
  • Removed redundant list population code from calculate_contours
meerk40t/gui/propertypanels/imageproperty.py
Enhanced visual feedback for selected contours
  • Added yellow fill color for highlighted contours
meerk40t/gui/propertypanels/imageproperty.py

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).