Little fix: don't create an empty undo/redo command when trying to add a second Input GraphNode

This commit is contained in:
Mariano Javier Suligoy 2015-07-25 22:05:45 -03:00
parent 5ffd818fb1
commit add0105c4e
3 changed files with 14 additions and 0 deletions

View file

@ -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();