Skip to content

Conversation

@Micheus
Copy link
Collaborator

@Micheus Micheus commented Mar 14, 2025

I spent two days traying to add an MMB option to the Connect command that could
allow us to connect edges multiple times by dragging the mouse on screen as we
use to do other adjustments.

The way the dragging code works currently doesn't updates correctly the model after
we finish the command. So, I changed it a little and it's working gracefully now.
It was required to check for selection changes as well as force dlist to be invalidated.

I hope you can approve this change or suggest a better way to achieve the result. This
kind of dynamic update could be used in other commands we can add further.

NOTE: Added the MMB option to the Connect command, allowing us to dynamically
increase the amount of cut;

connect-multiple2

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a middle mouse button (MMB) option to the Connect command in Wings3D, enabling users to dynamically increase the number of parallel edges by dragging the mouse. The implementation required modifications to the dragging system to properly update the model state and selection after command completion.

Key Changes:

  • Adds connect_multiple command that creates multiple parallel edges with interactive count adjustment
  • Introduces a new count unit type to the drag system for integer-based adjustments
  • Updates the normalize functions to track and update selection state during drag operations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
src/wings_edge_cmd.erl Adds connect_multiple command with interactive edge count adjustment via dragging; updates menu tooltips for the Connect command
src/wings_drag.erl Introduces count unit type with integer limits; updates normalize functions to track selection changes during drag operations; adds support for count display in help messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dgud
Copy link
Owner

dgud commented Dec 2, 2025

I have let co-pilot review this, fix stuff that seems valid and write when your are done, or nothing needs fixing.
It is wrong often.

  updated on screen. That happens when an operation add more elements
  dynamically, like in this code which we add multiple connections that
  bacome selected for better feedback.
  are integer values which was not handled before.
@Micheus Micheus force-pushed the mv/new-connect-MMB-option branch from 4c91996 to 0f65bbe Compare December 16, 2025 23:34
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