-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
gtk3 rubberband is invisible #17773
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
Comments
With #17772, the rubberband works for me, but it is not perfect, as it flashes and disappears if you stop moving the cursor. |
A bisect suggest this has been broken ever since #10209 and that the correct fix is along the lines of restoring diff --git i/lib/matplotlib/backends/backend_gtk3.py w/lib/matplotlib/backends/backend_gtk3.py
index 31d20f3e6..62d85fe39 100644
--- i/lib/matplotlib/backends/backend_gtk3.py
+++ w/lib/matplotlib/backends/backend_gtk3.py
@@ -294,6 +294,9 @@ class FigureCanvasGTK3(Gtk.DrawingArea, FigureCanvasBase):
# docstring inherited
if self.is_drawable():
self.queue_draw()
+ # do a synchronous draw (its less efficient than an async draw,
+ # but is required if/when animation is used)
+ self.get_property("window").process_updates(False)
def draw_idle(self):
# docstring inherited but I guess it seems costly to always do this, may be nicer to only do this on draw_rubberband but this doesn't seem to work there... |
I merged #17772 to bank the crash fix. |
Just like Qt, the drawing should only be done in the draw (paint) event, so move the rubberband draw there. Also, make it black-and-white like the Qt one. Fixes matplotlib#17773.
Just like Qt, the drawing should only be done in the draw (paint) event, so move the rubberband draw there. Also, make it black-and-white like the Qt one. Fixes matplotlib#17773.
Just like Qt, the drawing should only be done in the draw (paint) event, so move the rubberband draw there. Also, make it black-and-white like the Qt one. Fixes matplotlib#17773.
Bug report
Bug summary
All's in the title.
Note that #17772 is necessary to avoid throwing an exception due to a logic error, but even with it, the rubberband is invisible.
Expected outcome
Matplotlib version
print(matplotlib.get_backend())
): gtk3agg/gtk3cairoThe text was updated successfully, but these errors were encountered: