mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:25:51 +08:00
Select material from menu when user clicks on it
The main function of the menu, after all. Contributes to issue CURA-8640.
This commit is contained in:
parent
5df5d6c37d
commit
5a76cd1615
@ -179,7 +179,9 @@ Cura.MenuItem
|
|||||||
{
|
{
|
||||||
id: materialTypeButton
|
id: materialTypeButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
@ -289,8 +291,17 @@ Cura.MenuItem
|
|||||||
{
|
{
|
||||||
id: materialColorButton
|
id: materialColorButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
Cura.MachineManager.setMaterial(extruderIndex, model.container_node);
|
||||||
|
menuPopup.itemHovered = 0; //Close all of these menus.
|
||||||
|
menuPopup.close();
|
||||||
|
colorPopup.itemHovered = 0;
|
||||||
|
colorPopup.close();
|
||||||
|
materialMenu.close();
|
||||||
|
}
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
menuPopup.itemHovered += 1;
|
menuPopup.itemHovered += 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user