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

Unable to resize OGL shape #2562

Open
landam opened this issue Jun 15, 2024 · 0 comments
Open

Unable to resize OGL shape #2562

landam opened this issue Jun 15, 2024 · 0 comments

Comments

@landam
Copy link

landam commented Jun 15, 2024

Operating system: Linux
wxPython version & source: 4.2.1, Debian package
Python version & source: 3.11.9, Debian package

Description of the problem:

Resizing OGL shape ends with an error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/canvas.py", line 321, in OnMouseEvent
    self.Draw()
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/canvas.py", line 101, in Draw
    self.GetDiagram().Redraw(dc)
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/diagram.py", line 42, in Redraw
    object.Draw(dc)
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/basic.py", line 1436, in Draw
    self.GetEventHandler().OnDraw(dc)
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/basic.py", line 154, in OnDraw
    self._previousHandler.OnDraw(dc)
  File "/usr/lib/python3/dist-packages/wx/lib/ogl/basic.py", line 2774, in OnDraw
    dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
TypeError: DC.DrawRectangle(): arguments did not match any overloaded call:
  overload 1: argument 3 has unexpected type 'float'
  overload 2: argument 1 has unexpected type 'int'
  overload 3: argument 1 has unexpected type 'int'

Steps to reproduce:

  1. Open wxPython demo
  2. Run OGL sample
  3. Pickup grayish rectangle shape (but it seems that this bug is relevant to all OGL shapes)
  4. Try to resize
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

No branches or pull requests

1 participant