Fix layer selection on delete
This commit is contained in:
@@ -100,7 +100,7 @@ class LayerSlot {
|
||||
var lpos = Project.layers.indexOf(this);
|
||||
Project.layers.remove(this);
|
||||
// Undo can remove base layer and then restore it from undo layers
|
||||
if (lpos > 0) Context.setLayer(Project.layers[lpos - 1]);
|
||||
Context.setLayer(Project.layers[lpos > 0 ? lpos - 1 : 0]);
|
||||
}
|
||||
|
||||
public function unload() {
|
||||
|
||||
@@ -307,6 +307,7 @@ class TabLayers {
|
||||
if (l.parent != null && l.parent.getChildren() == null) {
|
||||
l.parent.delete();
|
||||
}
|
||||
Context.ddirty = 2;
|
||||
}
|
||||
}
|
||||
if (ui.button(tr("Move Up"), Left)) {
|
||||
|
||||
Reference in New Issue
Block a user