mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-03 10:58:34 -06:00
Add check for illegal characters
This commit is contained in:
@@ -527,6 +527,11 @@ bool HorizonsDialog::isValidInput() {
|
||||
message = "Target not selected";
|
||||
styleLabel(_targetLabel, true);
|
||||
}
|
||||
else if (_targetEdit->text().toStdString().find_first_of("¤<>§£´¨€") != std::string::npos) {
|
||||
isValid = false;
|
||||
message = "Target includes illegel characters";
|
||||
styleLabel(_targetLabel, true);
|
||||
}
|
||||
|
||||
// Observer field
|
||||
else if (_centerEdit->text().isEmpty() &&
|
||||
@@ -542,6 +547,11 @@ bool HorizonsDialog::isValidInput() {
|
||||
message = "Observer not selected";
|
||||
styleLabel(_centerLabel, true);
|
||||
}
|
||||
else if (_centerEdit->text().toStdString().find_first_of("¤<>§£´¨€") != std::string::npos) {
|
||||
isValid = false;
|
||||
message = "Observer includes illegel characters";
|
||||
styleLabel(_centerLabel, true);
|
||||
}
|
||||
|
||||
// Step size
|
||||
else if (_stepEdit->text().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user