Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

napari-console should (maybe?) set viewer window as its parent #15

Open
jni opened this issue May 18, 2021 · 1 comment
Open

napari-console should (maybe?) set viewer window as its parent #15

jni opened this issue May 18, 2021 · 1 comment

Comments

@jni
Copy link
Member

jni commented May 18, 2021

When I tried to use Ctrl-W to close napari as a shortcut with the console open, I got the traceback:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/projects/napari/napari/_qt/qt_main_window.py in close_window(self=<napari._qt.qt_main_window._QtMainWindow object>)
    263                 break
    264 
--> 265             parent = parent.parent()
        parent = <napari_console.qt_console.QtConsole object at 0x7f08c3cee550>
        parent.parent = None
    266 
    267     def closeEvent(self, event):

TypeError: 'NoneType' object is not callable

possibly setting the viewer as the parent would work, but I don't actually know this.

@psobolewskiPhD
Copy link
Member

For what it's worth, on my macOS 12.5.1 and napari 0.4.16 using Command-W while typing in console works and kills the viewer.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants