mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06: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
1 changed files with 12 additions and 1 deletions
|
@ -179,7 +179,9 @@ Cura.MenuItem
|
|||
{
|
||||
id: materialTypeButton
|
||||
anchors.fill: parent
|
||||
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.NoButton
|
||||
|
||||
onEntered:
|
||||
{
|
||||
|
@ -289,8 +291,17 @@ Cura.MenuItem
|
|||
{
|
||||
id: materialColorButton
|
||||
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:
|
||||
{
|
||||
menuPopup.itemHovered += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue