editor: error when ctrl+clicking on a root's child

This commit is contained in:
bordun 2022-07-04 10:23:25 +02:00
parent ad6916b609
commit 99a2652d09
2 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,9 @@
# Changelog
## 1.16.7
- bug fixes
- editor: error when ctrl+clicking on a root's child
## 1.16.6

View file

@ -562,12 +562,14 @@ class Editor {
}
var parent = this.selectedWidgets[0].parent
while (parent !== widgetManager) {
if (parent.getProp('lock')) {
this.selectedWidgets = [parent]
if (this.selectedWidgets.length) {
var parent = this.selectedWidgets[0].parent
while (parent !== widgetManager) {
if (parent.getProp('lock')) {
this.selectedWidgets = [parent]
}
parent = parent.parent
}
parent = parent.parent
}
if (options.fromLasso && !options.lassoEnd) return