Skip to content
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

Unsaved changes dialog displays incorrect GCode Flavor #1238

Closed
craiglink opened this issue Jun 3, 2021 · 1 comment
Closed

Unsaved changes dialog displays incorrect GCode Flavor #1238

craiglink opened this issue Jun 3, 2021 · 1 comment
Labels
bug Something isn't working as intended fix is live in the last release Please download /build the last release and try to reproduce.

Comments

@craiglink
Copy link

Describe the bug
When changing GCode Flavors and switching between printers, the wrong name of the GCode flavor is displayed. This is present in PrusaSlicer. Fix included

To Reproduce
Steps to reproduce the behavior:

  1. Add to printers to SuperSlicr
  2. Change the GCode Flavor to one ( Marlin -> Klipper ) without saving
  3. Toggle to the second printer
  4. Unsaved Changes Dialog is displayed showing the incorrect GCode Flavor names

>> Project File <<

Expected behavior
Correct and Selected GCode Flavors should be displayed

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Version 2.3.56.1

Additional context
The issue is that the function in UnsaveChangesDialog.cpp
get_string_from_enum() makes the assumption that enums are added to the enum_labels and enum_values vectors in numerical order. This is not the case as "klipper" is added in the 6th position but has an enum value of 7 - https://github.com/supermerill/SuperSlicer/blob/master/src/libslic3r/PrintConfig.cpp#L1901

The code already handles a case where all enum values arent in these vectors for infill. This same code path should be used for all enums displayed in the UnsavedChangesDialog since the performance hit to render this dialog would be minimal

@craiglink
Copy link
Author

see #1239 for fix

@supermerill supermerill added bug Something isn't working as intended fixed for the next version That means that you should be able to test it in the latest nightly build fix is live in the last release Please download /build the last release and try to reproduce. and removed fixed for the next version That means that you should be able to test it in the latest nightly build labels Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended fix is live in the last release Please download /build the last release and try to reproduce.
Projects
None yet
Development

No branches or pull requests

2 participants