Fix #1403 Cannot unload individual animations

No scroll bars in variable placeholder code field
Add event hook for update view
Fix issue where animation rotate tool would not update rotation
This commit is contained in:
JannisX11 2022-05-06 13:35:30 +02:00
parent fa7e8b3e46
commit 2df6e73dc5
4 changed files with 8 additions and 7 deletions

View File

@ -889,6 +889,9 @@
}
/* Placeholders */
#var_placeholder_area {
overflow: auto;
}
#placeholder_buttons li {
padding: 0px 8px;
}

View File

@ -730,8 +730,8 @@ class Animation {
icon: 'remove',
condition: () => Format.animation_files,
click(animation) {
Undo.initEdit({animations: [this]})
this.remove(false, false);
Undo.initEdit({animations: [animation]})
animation.remove(false, false);
Undo.finishEdit('Unload animation', {animations: []})
}
},

View File

@ -747,8 +747,6 @@ const Canvas = {
* @param {boolean} options.selection Update the selection
*/
updateView(options) {
if (options.elements) {
let aspects = options.element_aspects || {};
options.elements.forEach(element => {
@ -781,6 +779,7 @@ const Canvas = {
if (options.selection) {
updateSelection();
}
Blockbench.dispatchEvent('update_view', options);
},
//Main updaters
clear() {

View File

@ -1402,9 +1402,8 @@
displayDistance(value - originalValue);
if (Toolbox.selected.id === 'rotate_tool' && BarItems.rotation_space.value !== 'bone') {} else {
Animator.preview()
}
previousValue = value
scope.hasChanged = true
}