File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -656,9 +656,20 @@ def ensure_minimum_sizes(self):
656
656
yield
657
657
finally :
658
658
self .splitter .setSizes ([sz [1 ], mpl_h ])
659
+ # 1. Process events
659
660
_process_events (self .plotter )
660
661
_process_events (self .plotter )
661
- self .mpl_canvas .canvas .setMinimumSize (0 , 0 )
662
+ # 2. Get the window size that accommodates the size
663
+ sz = self .plotter .app_window .size ()
664
+ # 3. Call app_window.setBaseSize and resize (in pyvistaqt)
665
+ self .plotter .window_size = (sz .width (), sz .height ())
666
+ # 4. Undo the min size setting and process events
667
+ self .plotter .interactor .setMinimumSize (0 , 0 )
668
+ _process_events (self .plotter )
669
+ _process_events (self .plotter )
670
+ # 5. Resize the window (again!) to the correct size
671
+ # (not sure why, but this is required on macOS at least)
672
+ self .plotter .window_size = (sz .width (), sz .height ())
662
673
_process_events (self .plotter )
663
674
_process_events (self .plotter )
664
675
# sizes could change, update views
You can’t perform that action at this time.
0 commit comments