Skip to content

Commit 56dc86d

Browse files
committed
Fix window sizing
If window is maximized then its size cannot be changed, therefore window state is set to normal before. See https://discourse.slicer.org/t/module-jupyternotebookslib-has-no-attribute-appwindow/11899/8
1 parent 4c5fa4d commit 56dc86d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

JupyterNotebooks/JupyterNotebooksLib/widgets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def setWindowSize(width=None, height=None, scale=None):
156156
if scale is not None:
157157
width *= scale
158158
height *= scale
159+
slicer.util.mainWindow().showNormal() # make sure the window is not maximized
159160
slicer.util.mainWindow().size = qt.QSize(width, height)
160161

161162
@staticmethod

0 commit comments

Comments
 (0)