We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Operating system: Ubuntu Linux 24.04 LTS wxPython version & source: wxPython v.4.2.2 gtk3 (pypi) Python version & source: Python v.3.12.3 (stock)
Description of the problem:
When drawing a rubberband, multiple bounding boxes are drawn that end up filling the entire window.
app = wx.App() frame = wx.Frame(None, -1, title='RubberBand Test', size=(300,300)) # Add a panel that the rubberband will work on. panel = wx.Panel(frame, -1) panel.SetBackgroundColour(wx.BLUE) # Create the rubberband frame.rubberBand = RubberBand(drawingSurface=panel) frame.rubberBand.reset(aspectRatio=0.5) # Add a button that creates a new rubberband def __newRubberBand(event): frame.rubberBand.reset() button = wx.Button(frame, 100, 'Reset Rubberband') frame.Bind(wx.EVT_BUTTON, __newRubberBand, button) # Layout the frame sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(panel, 1, wx.EXPAND | wx.ALL, 5) sizer.Add(button, 0, wx.ALIGN_CENTER | wx.ALL, 5) frame.SetAutoLayout(1) frame.SetSizer(sizer) frame.Show(1) app.MainLoop()
This is due to a bug in the __drawAndErase() method that is not clearing the DC before moving or resizing the bounding box but drawing another box.
As the fix is so simple I would be happy to contribute a PR fixing this behavior.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Operating system: Ubuntu Linux 24.04 LTS
wxPython version & source: wxPython v.4.2.2 gtk3 (pypi)
Python version & source: Python v.3.12.3 (stock)
Description of the problem:
When drawing a rubberband, multiple bounding boxes are drawn that end up filling the entire window.
Code Example (click to expand)
This is due to a bug in the __drawAndErase() method that is not clearing the DC before moving or resizing the bounding box but drawing another box.
As the fix is so simple I would be happy to contribute a PR fixing this behavior.
The text was updated successfully, but these errors were encountered: