mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:39:03 +08:00
Binds the backspace button to deleteSelection functionality
fixes #CURA-249
This commit is contained in:
parent
58d5487eb9
commit
a7d43efe15
@ -137,7 +137,6 @@ Item
|
|||||||
id: deleteObjectAction;
|
id: deleteObjectAction;
|
||||||
text: catalog.i18nc("@action:inmenu","Delete Object");
|
text: catalog.i18nc("@action:inmenu","Delete Object");
|
||||||
iconName: "edit-delete";
|
iconName: "edit-delete";
|
||||||
shortcut: StandardKey.Backspace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
|
@ -22,6 +22,19 @@ UM.MainWindow
|
|||||||
id: backgroundItem;
|
id: backgroundItem;
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
UM.I18nCatalog{id: catalog; name:"cura"}
|
UM.I18nCatalog{id: catalog; name:"cura"}
|
||||||
|
|
||||||
|
//DeleteSelection on the keypress backspace event
|
||||||
|
Keys.onPressed: {
|
||||||
|
if (event.key == Qt.Key_Backspace)
|
||||||
|
{
|
||||||
|
if(objectContextMenu.objectId != 0)
|
||||||
|
{
|
||||||
|
Printer.deleteObject(objectContextMenu.objectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
UM.ApplicationMenu
|
UM.ApplicationMenu
|
||||||
{
|
{
|
||||||
id: menu
|
id: menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user