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

fix: prevent preview from being disabled when printer selected #405

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

Jeredian
Copy link
Collaborator

@Jeredian Jeredian commented Feb 21, 2024

Description

This fixes saving and showing preview setting for FLSUN-QQS printer.

Type of change

What kind of change does this PR introduce?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Translations
  • Documentation
  • Other... Please describe:

What is the current behavior?

When user selects printer without preview image settings (simage, gimage ), preview settings become disabled.

What is the new behavior(if this is a feature change)?

  • When a user selects a printer without image preview settings,
    • preview settings tab should remain enabled for the next load
  • When user selects "custom" settings and set image preview settings
    • image preview settings should be saved and loaded next time
  • When user selects "custom" settings, and left image preview settings empty
    • preview settings become disabled next time

How has this been tested?

Test case 1

  • Open plugin settings
  • Enable preview settings
  • Choose FLSUN-QQS printer
  • Close plugin settings dialog
  • Open it again and expect that FLSUN-QQS is selected, and preview settings enabled

Test case 2

  • Open plugin settings
  • Enable preview settings
  • Choose Custom
  • Leave simage and gimage empty
  • Close plugin settings dialog
  • Open it again and expect that Custom is selected, and preview settings disabled

Test case 3

  • Open plugin settings
  • Enable preview settings
  • Choose Custom
  • Set simage and gimage empty
  • Close plugin settings dialog
  • Open it again and expect that Custom is selected, and preview settings enabled

Test case 4

  • Open plugin settings
  • Enable preview settings
  • Choose Default
  • Close plugin settings dialog
  • Open it again and expect that Default is selected, and preview settings enabled

  • Tested on Mac OS

Does this PR introduce a breaking change?

  • Yes
  • No

Does it closes one of the existing issues?

  • Yes
  • No

Other information

PR Checklist:

  • The pull request opens from the issue/patch/feature/bugfix branch (right side) and not main branch!
  • The pull request title, commit messages and code are follows our guidelines: Contribution guide
  • All commits are signed-off. See How to sign-off commit
  • The code changes are commented, particularly in hard-to-understand areas

@Jeredian Jeredian added the pull request: bug Pull request with changes related to behavior that is considered incorrect label Feb 21, 2024
@Jeredian Jeredian marked this pull request as ready for review February 21, 2024 09:17
…ected

Signed-off-by: Pavel Polyakov <djeredian@gmail.com>
Signed-off-by: Pavel Polyakov <djeredian@gmail.com>
Copy link

sonarcloud bot commented Feb 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Jeredian Jeredian merged commit 0e90f35 into develop Feb 21, 2024
5 checks passed
@Jeredian Jeredian deleted the issue-405 branch February 21, 2024 11:12
@Jeredian Jeredian mentioned this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request: bug Pull request with changes related to behavior that is considered incorrect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants