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

PR: Added validation to window/position config value saved in spyder.ini #3754

Merged
merged 4 commits into from
Dec 2, 2016

Conversation

dalthviz
Copy link
Member

Fixes #3748

@ccordoba12 ccordoba12 added this to the v3.1 milestone Nov 28, 2016
current_width = screenShape.width()
current_height = screenShape.height()
if current_width < width or current_height < height:
value = self.get_default(section, option)
Copy link
Member

@ccordoba12 ccordoba12 Nov 28, 2016

Choose a reason for hiding this comment

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

Although this is the right thing to do, this is not the right place. You need to find where this setting is applied (most probably in app/mainwindow.py) and use this validation there.

@ccordoba12 ccordoba12 changed the title PR: Added validation to window/position config value from .ini file PR: Added validation to window/position config value saved in spdyer.ini Dec 1, 2016
# with the current screen. See issue 3748
width = pos[0]
height = pos[1]
screenShape = QApplication.desktop().geometry()
Copy link
Member

Choose a reason for hiding this comment

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

Please change this variable's name to screen_shape.

@ccordoba12
Copy link
Member

Other than a minor comment, this looks good to me. Thanks @dalthviz!

@ccordoba12
Copy link
Member

Good job, thanks @dalthviz!

@ccordoba12 ccordoba12 changed the title PR: Added validation to window/position config value saved in spdyer.ini PR: Added validation to window/position config value saved in spyder.ini Dec 2, 2016
@ccordoba12 ccordoba12 merged commit 10df073 into spyder-ide:3.x Dec 2, 2016
ccordoba12 added a commit that referenced this pull request Dec 2, 2016
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.

2 participants