Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolSpy3 committed Jul 8, 2024
1 parent c12c743 commit 9246e35
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/webots/vrml/WbField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void WbField::checkValueIsAccepted() {
if (!mModel->isValueAccepted(mValue, &refusedIndex)) {
QString acceptedValuesList = "";
foreach (const WbFieldValueRestriction acceptedValue, mModel->acceptedValues())
acceptedValuesList += acceptedValue.toSimplifiedStringRepresentation() + (acceptedValue->allowsSubtypes() ? "+" : "") + ", ";
acceptedValuesList += acceptedValue.toSimplifiedStringRepresentation() + (acceptedValue.allowsSubtypes() ? "+" : "") + ", ";
acceptedValuesList.chop(2);
QString error;
if (isSingle()) {
Expand Down
1 change: 0 additions & 1 deletion src/webots/vrml/WbFieldModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "WbToken.hpp"
#include "WbTokenizer.hpp"
#include "WbValue.hpp"
#include "WbVersion.hpp"
#include "WbWriter.hpp"

#include <cassert>
Expand Down
4 changes: 2 additions & 2 deletions tests/parser/protos/ProtoRestrictedFieldValues.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ PROTO ProtoRestrictedFieldValues
field SFRotation{0 1 0 0, 0 0 1 0, 0 1 0 1.5708} rotation 0 0 1 0
field SFVec3f{0 0 0} translation 0 0 0
field MFNode{Solid{}+, PoseProto{}+} extensionSlot []
field MFNode{PoseProto{}} extensionSlot2 []
field MFNode{Pose{}} extensionSlot3 []
unconnectedField MFNode{PoseProto{}} extensionSlot2 []
unconnectedField MFNode{Pose{}} extensionSlot3 []
]
{
Solid {
Expand Down
2 changes: 1 addition & 1 deletion tests/parser/worlds/proto_allowed_mf_field_value.wbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ProtoRestrictedFieldValues {
Robot {
}
]
extensonSlot2 [
extensionSlot2 [
PoseProto {
}
]
Expand Down

0 comments on commit 9246e35

Please sign in to comment.