-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix SerialPlotter.java not applying line ending preference on new window to dropdown box #11070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? You rename a method, but no calls to this method? It seems it was called under the old name, how does that work? Is it that the superclass defines the method by the proper name and SerialPlotter tried but failed to override this method due to the typo?
What does this mean in practice? Before this fix, the line endings preference was not applied to the plotter? Or was it just that the dropdown did not reflect the actual value, but the right value was used internally?
@matthijskooijman The method is called on line
Because of the typo, the class function was never called and only the superclass is called. Before the change, changing the line ending preference does change the preference. Arduino/app/src/processing/app/SerialPlotter.java Lines 323 to 326 in f4e8a91
However, it's possible that Arduino/app/src/processing/app/SerialPlotter.java Lines 347 to 369 in f4e8a91
|
Change can also be seen here: #7461 |
|
applyPreferences
is called but the class function is misspelled asappyPreferences
Arduino/app/src/processing/app/SerialPlotter.java
Line 338 in f4e8a91
Because of the typo, the class function was never called and only the superclass is called.
In practice, the
applyPreferences
is just reading the preferences file and setting the dropdown boxes to the current running value. Because the class applyPreferences wasn't called, the line ending dropdown box is not displaying the correct line ending that the user had set.Before the change, changing the line ending preference does change the preference.
Arduino/app/src/processing/app/SerialPlotter.java
Lines 323 to 326 in f4e8a91
However, it's possible that
No line ending
is used even if you had a line ending preference set internally. (send() class function uses the current dropdown selection, and becauseNo line ending
is the default value on new window)Arduino/app/src/processing/app/SerialPlotter.java
Lines 347 to 369 in f4e8a91