diff --git a/qe.ipynb b/qe.ipynb index 7ae6eb778..cfc21bccd 100644 --- a/qe.ipynb +++ b/qe.ipynb @@ -56,9 +56,8 @@ "metadata": {}, "outputs": [], "source": [ - "from IPython.display import display\n", - "\n", "from aiidalab_qe.app.wrapper import AppWrapperContoller, AppWrapperModel, AppWrapperView\n", + "from IPython.display import display\n", "\n", "model = AppWrapperModel()\n", "view = AppWrapperView()\n", @@ -75,12 +74,12 @@ "source": [ "import urllib.parse as urlparse\n", "\n", + "from aiidalab_qe.app.main import App\n", + "\n", "from aiidalab_widgets_base.bug_report import (\n", " install_create_github_issue_exception_handler,\n", ")\n", "\n", - "from aiidalab_qe.app.main import App\n", - "\n", "install_create_github_issue_exception_handler(\n", " view.output,\n", " url=\"https://github.com/aiidalab/aiidalab-qe/issues/new\",\n", diff --git a/src/aiidalab_qe/app/wrapper.py b/src/aiidalab_qe/app/wrapper.py index 999f9aca7..c472c7ee8 100644 --- a/src/aiidalab_qe/app/wrapper.py +++ b/src/aiidalab_qe/app/wrapper.py @@ -11,7 +11,7 @@ def without_triggering(toggle: str): def decorator(func): def wrapper(self, change: dict): """Toggle off other button without triggering its callback.""" - view: AppWrapperView = getattr(self, "_view") + view: AppWrapperView = self._view button: ipw.ToggleButton = getattr(view, toggle) callback = getattr(self, f"_on_{toggle}") button.unobserve(callback, "value")