Use the correct function parameters when removing objects in menu

It turns out that the order of these functions matters. So when we created a
function with only one param, it would actually give it the index. Removing
with the index didn't work, so the object would still be there. The Qt objects
would already be deleted which caused segfaults

CURA-9222
This commit is contained in:
Jaime van Kessel 2022-04-28 17:03:41 +02:00
parent 2ecec1fa37
commit 6b9cc3f1c7
11 changed files with 15 additions and 15 deletions

View file

@ -232,7 +232,7 @@ UM.Dialog
}
onObjectAdded: function(index, object) { scriptsMenu.insertItem(index, object)}
onObjectRemoved: function(object) { scriptsMenu.removeItem(object) }
onObjectRemoved: function(index, object) { scriptsMenu.removeItem(object) }
}
}