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

5.0.4 Project Load Fix #1774

Merged
merged 3 commits into from
Feb 2, 2021
Merged

5.0.4 Project Load Fix #1774

merged 3 commits into from
Feb 2, 2021

Conversation

krzywon
Copy link
Contributor

@krzywon krzywon commented Jan 29, 2021

This fixes a project load issue noted by @RichardHeenan in a comment in 1689. This fixes the issue with loading projects with 3 (or more) fits. I am working on the errors thrown in another branch.

Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good code.
The only problematic thing I can see is if you had empty self.tabs list. This would throw a ValueError from max. However, self.tabs is never empty, as deleting the last tab always creates a new tab in the perspective with incremented tab_id

@krzywon
Copy link
Contributor Author

krzywon commented Jan 29, 2021

Good catch, @rozyczko. I'll add a default value to max for completeness. Would 0 be an appropriate value? An empty list implies no tabs exist and self.maxIndex would be set to 1.

@butlerpd butlerpd merged commit 587c4c0 into release_5.0.4 Feb 2, 2021
@krzywon krzywon deleted the 504-project-load-fixes branch February 2, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants