hasii2011 / hasii2011/ogl

Fix bug in DiagramFrame.SetInfinite()

Open
#128 0 comments 0 reactions 1 assignee Claimed by @hasii2011 View on GitHub
bug
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

When calculating the center of the diagram, if prefs.centerDiagram is True, the values are currently float. They should be integer; change to:

```python

noUnitX = (vWidth-cWidth) // xUnit
noUnitY = (vHeight-cHeight) // yUnit

if self._prefs.centerDiagram is True:
self.Scroll(noUnitX // 2, noUnitY // 2) # set the scrollbars position in the middle of their scale
else:
self.Scroll(0, 0)

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.