- Fix crash when opening animation setting and scaler from menu panel.

This commit is contained in:
Tanasart 2023-11-06 19:09:13 +07:00
parent b6fe38a0ba
commit 7b8defae11
3 changed files with 10 additions and 4 deletions

View file

@ -17,7 +17,10 @@ function Node_Cache(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) const
insp2UpdateTooltip = "Clear cache"; insp2UpdateTooltip = "Clear cache";
insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ]; insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ];
static onInspector2Update = function() { clearCache(true); } static onInspector2Update = function() {
clearCache(true);
enableNodeGroup();
}
static step = function() { #region static step = function() { #region
if(cache_loading) { if(cache_loading) {

View file

@ -24,7 +24,10 @@ function Node_Cache_Array(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group)
insp2UpdateTooltip = "Clear cache"; insp2UpdateTooltip = "Clear cache";
insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ]; insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ];
static onInspector2Update = function() { clearCache(); } static onInspector2Update = function() {
clearCache();
enableNodeGroup();
}
static step = function() { #region static step = function() { #region
if(!cache_loading) return; if(!cache_loading) return;

View file

@ -132,12 +132,12 @@ function Panel_Menu() : PanelContent() constructor {
]], ]],
[ __txt("Animation"), [ [ __txt("Animation"), [
menuItem(__txtx("panel_menu_animation_setting", "Animation setting..."), function() { menuItem(__txtx("panel_menu_animation_setting", "Animation setting..."), function() {
var dia = dialogCall(o_dialog_animation); var dia = dialogPanelCall(new Panel_Animation_Setting());
dia.anchor = ANCHOR.none; dia.anchor = ANCHOR.none;
}, THEME.animation_setting), }, THEME.animation_setting),
-1, -1,
menuItem(__txtx("panel_menu_animation_scaler", "Animation scaler..."), function() { menuItem(__txtx("panel_menu_animation_scaler", "Animation scaler..."), function() {
dialogCall(o_dialog_anim_time_scaler); dialogPanelCall(new Panel_Animation_Scaler());
}, THEME.animation_timing), }, THEME.animation_timing),
]], ]],
[ __txt("Rendering"), [ [ __txt("Rendering"), [