Skip to content

Commit 1c9e5d3

Browse files
author
Davide Faconti
committed
fix issue #85
1 parent ff5ac33 commit 1c9e5d3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bt_editor/custom_node_dialog.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ void CustomNodeDialog::checkValid()
160160

161161
bool empty_param_name = false;
162162
bool invalid_param_name = false;
163+
bool reselved_param_name = false;
163164
std::set<QString> param_names;
164165
for (int row=0; row < ui->tableWidget->rowCount(); row++ )
165166
{
@@ -172,6 +173,10 @@ void CustomNodeDialog::checkValid()
172173
{
173174
invalid_param_name = true;
174175
}
176+
else if( param_name == "ID" || param_name == "name" )
177+
{
178+
reselved_param_name = true;
179+
}
175180
else{
176181
param_names.insert(param_name);
177182
}
@@ -182,7 +187,11 @@ void CustomNodeDialog::checkValid()
182187
}
183188
else if( invalid_param_name )
184189
{
185-
ui->labelWarning->setText("Invalid key: use only letters, digits and underscores");
190+
ui->labelWarning->setText("Invalid key: use only letters, digits and underscores.");
191+
}
192+
else if( reselved_param_name )
193+
{
194+
ui->labelWarning->setText("Reserved port key: the words \"name\" and \"ID\" should not be used.");
186195
}
187196
else if( param_names.size() < ui->tableWidget->rowCount() )
188197
{

0 commit comments

Comments
 (0)