mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Little fix: don't create an empty undo/redo command when trying to add a second Input GraphNode
This commit is contained in:
parent
5ffd818fb1
commit
add0105c4e
3 changed files with 14 additions and 0 deletions
|
|
@ -2162,6 +2162,9 @@ void ShaderGraphView::_notification(int p_what) {
|
|||
|
||||
void ShaderGraphView::add_node(int p_type, const Vector2 &location) {
|
||||
|
||||
if ((p_type==ShaderGraph::NODE_INPUT||p_type==ShaderGraph::NODE_INPUT) && graph->node_count(type, p_type)>0)
|
||||
return;
|
||||
|
||||
List<int> existing;
|
||||
graph->get_node_list(type,&existing);
|
||||
existing.sort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue