mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-12 07:16:49 +01:00
- [Inline Group] Fix error when deleteing the last node in the group.
This commit is contained in:
parent
271bc53343
commit
4d6d06c738
2 changed files with 9 additions and 13 deletions
|
@ -101,6 +101,7 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
||||||
if(add_point) _hash += $"{point_x},{point_y}|";
|
if(add_point) _hash += $"{point_x},{point_y}|";
|
||||||
|
|
||||||
if(_hash == "") {
|
if(_hash == "") {
|
||||||
|
group_vertex = [];
|
||||||
destroy();
|
destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -289,15 +290,6 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
||||||
|
|
||||||
draw_set_alpha(1);
|
draw_set_alpha(1);
|
||||||
|
|
||||||
//draw_set_color(c_white);
|
|
||||||
//for( var i = 0, n = array_length(group_vertex); i < n; i++ ) {
|
|
||||||
// a = group_vertex[i];
|
|
||||||
// var _vx = _x + a[0] * _s;
|
|
||||||
// var _vy = _y + a[1] * _s;
|
|
||||||
|
|
||||||
// draw_circle(_vx, _vy, 1, false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
add_point = false;
|
add_point = false;
|
||||||
|
|
||||||
return _hov;
|
return _hov;
|
||||||
|
|
|
@ -1024,15 +1024,19 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
frame_hovering = noone;
|
frame_hovering = noone;
|
||||||
|
|
||||||
for(var i = 0; i < array_length(nodes_list); i++) {
|
for(var i = 0; i < array_length(nodes_list); i++) {
|
||||||
nodes_list[i].cullCheck(gr_x, gr_y, graph_s, -32, -32, w + 32, h + 64);
|
var _nl = nodes_list[i];
|
||||||
nodes_list[i].preDraw(gr_x, gr_y, graph_s, gr_x, gr_y);
|
|
||||||
|
_nl.cullCheck(gr_x, gr_y, graph_s, -32, -32, w + 32, h + 64);
|
||||||
|
_nl.preDraw(gr_x, gr_y, graph_s, gr_x, gr_y);
|
||||||
}
|
}
|
||||||
printIf(log, $"Predraw time: {get_timer() - t}"); t = get_timer();
|
printIf(log, $"Predraw time: {get_timer() - t}"); t = get_timer();
|
||||||
|
|
||||||
#region draw frame
|
#region draw frame
|
||||||
for(var i = 0; i < array_length(nodes_list); i++) {
|
for(var i = 0; i < array_length(nodes_list); i++) {
|
||||||
if(nodes_list[i].drawNodeBG(gr_x, gr_y, mx, my, graph_s, display_parameter))
|
var _nl = nodes_list[i];
|
||||||
frame_hovering = nodes_list[i];
|
|
||||||
|
if(_nl.drawNodeBG(gr_x, gr_y, mx, my, graph_s, display_parameter))
|
||||||
|
frame_hovering = _nl;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
printIf(log, $"Frame draw time: {get_timer() - t}"); t = get_timer();
|
printIf(log, $"Frame draw time: {get_timer() - t}"); t = get_timer();
|
||||||
|
|
Loading…
Reference in a new issue