[apps/code] Remove duplicates in the variable box

Example script:
from turtle import *
hideturtle()

We had "hideturtle" in the local variables, and "hideturtle()" in the
imported. Now we should only have the latter.
This commit is contained in:
Léa Saviot
2020-05-25 14:05:46 +02:00
committed by Émilie Feral
parent 40d98389d4
commit 5412410723
2 changed files with 20 additions and 17 deletions

View File

@@ -99,7 +99,7 @@ private:
* already contained in the variable box. */
void checkAndAddNode(const char * textToAutocomplete, int textToAutocompleteLength, ScriptNode::Type type, NodeOrigin origin, const char * name, int nameLength, const char * nodeSourceName = nullptr, const char * description = nullptr);
bool shouldAddNode(const char * textToAutocomplete, int textToAutocompleteLength, const char * name, int nameLength, ScriptNode::Type type, NodeOrigin origin);
bool contains(const char * name, int nameLength);
bool contains(const char * name, int nameLength, ScriptNode::Type type);
void addNode(ScriptNode::Type type, NodeOrigin origin, const char * name, int nameLength, const char * nodeSourceName = nullptr, const char * description = nullptr);
VariableBoxEmptyController m_variableBoxEmptyController;
ScriptNode m_currentScriptNodes[k_maxScriptNodesCount];