Skip to content

Commit

Permalink
Fix ToolType serialization bug. (#3467)
Browse files Browse the repository at this point in the history
The following serialization invariant was found to not
hold for ToolType:

    fromString(toString(x)) == x

The reason was a mismatch in serialization:

    toolTypeToString(TOOL_PLAY_OBJECT) == "PlayObject"
    toolTypeFromString("playObject") == TOOL_PLAY_OBJECT)

This probably had the effect of incorrectly serializing. We correct this
by changing the return value of  toolTypeToString to match the camelCase
style seen in its other return values.
  • Loading branch information
createyourpersonalaccount committed Oct 13, 2021
1 parent c8d690c commit 07264b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control/ToolEnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ auto toolTypeToString(ToolType type) -> string {
case TOOL_SELECT_OBJECT:
return "selectObject";
case TOOL_PLAY_OBJECT:
return "PlayObject";
return "playObject";
case TOOL_VERTICAL_SPACE:
return "verticalSpace";
case TOOL_HAND:
Expand Down

0 comments on commit 07264b0

Please sign in to comment.