X Tutup
Skip to content

Fix "Make Unique" button only working with left mouse click#113740

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
ayanchavand:fix/left-mouse-make-unique
Dec 15, 2025
Merged

Fix "Make Unique" button only working with left mouse click#113740
Repiteo merged 1 commit intogodotengine:masterfrom
ayanchavand:fix/left-mouse-make-unique

Conversation

@ayanchavand
Copy link
Contributor

Fixes #113738
Removed the Mouse button mask for right so the button only works for left click as suggested by the tooltip

@ayanchavand ayanchavand requested a review from a team December 8, 2025 06:39
Copy link
Contributor

@arkology arkology left a comment

Choose a reason for hiding this comment

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

I was just in process of making a patch...
Your solution will break making recursive unique.
Most likely the right fix is:

void EditorResourcePicker::_on_unique_button_pressed() {
	if (Input::get_singleton()->is_mouse_button_pressed(MouseButton::LEFT)) {
		_edit_menu_cbk(OBJ_MENU_MAKE_UNIQUE);
	} else if (Input::get_singleton()->is_mouse_button_pressed(MouseButton::RIGHT) && _is_uniqueness_enabled(true)) {
		_edit_menu_cbk(OBJ_MENU_MAKE_UNIQUE_RECURSIVE);
	}
}

@ayanchavand ayanchavand force-pushed the fix/left-mouse-make-unique branch from c9820d1 to 20c183b Compare December 8, 2025 07:45
@ayanchavand
Copy link
Contributor Author

Sorry about that! I am quite new to engine contribution. I have added your fix

@arkology
Copy link
Contributor

arkology commented Dec 8, 2025

Please note that I did not test this fix, make sure it works correctly :)

@ayanchavand
Copy link
Contributor Author

I checked, it works.

@AThousandShips AThousandShips added this to the 4.6 milestone Dec 8, 2025
@akien-mga akien-mga changed the title Fix: make-unique button work for left mouse click only Fix "Make Unique" button only working with left mouse click Dec 9, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Dec 15, 2025

That's not a regression btw, it's a bug in the new functionality.

@Repiteo Repiteo merged commit fbf6956 into godotengine:master Dec 15, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 15, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linked Resource Indicator reacts to right-clicking unexpectedly

6 participants

X Tutup