- [Preview Panel] Fix overlay gizmo error when having multiple instances of the panels.

This commit is contained in:
Tanasart 2024-06-19 14:32:28 +07:00
parent c506e06023
commit 10e4041a32
2 changed files with 18 additions and 9 deletions

View file

@ -40,7 +40,12 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
nodes_select = [ "All nodes", "Selected" ];
widgets = [];
widgets[0] = [ "Nodes", new scrollBox(nodes_select, function(val) { sel = val; nodeList = val? ds_list_create_from_array(targetPanel.nodes_selecting) : targetPanel.nodes_list; refresh(); }, false),
widgets[0] = [ "Nodes", new scrollBox(nodes_select,
function(val) {
sel = val;
nodeList = val? targetPanel.nodes_selecting : targetPanel.nodes_list;
refresh();
}, false),
function() { return nodes_select[sel] } ];
widgets[1] = [ "Scale", new textBox(TEXTBOX_INPUT.number, function(val) { settings.scale = val; refresh(); }),

View file

@ -2020,18 +2020,24 @@ function Panel_Preview() : PanelContent() constructor {
drawPreviewOverlay();
var inspect_node = PANEL_INSPECTOR.getInspecting();
var tool = noone;
drawViewController();
tool_side_draw_l = false;
tool_side_draw_r = false;
var tool = noone;
if(inspect_node) {
tool = inspect_node.getTool();
if(tool) drawNodeTools(pFOCUS, tool);
} else
tool_current = noone;
if(PANEL_PREVIEW == self) {
if(inspect_node) {
tool = inspect_node.getTool();
if(tool) drawNodeTools(pFOCUS, tool);
} else
tool_current = noone;
}
if(!d3_active) drawSplitView();
drawToolBar(tool);
if(mouse_on_preview && mouse_press(mb_right, pFOCUS) && !key_mod_press(SHIFT)) {
menuCall("preview_context_menu",,, [
@ -2046,8 +2052,6 @@ function Panel_Preview() : PanelContent() constructor {
],, getNodePreview());
}
if(!d3_active) drawSplitView();
drawToolBar(tool);
} #endregion
////=========== ACTION ===========