Skip to content
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

Use get_app_model instead of get_app #103

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions midi_app_controller/state/state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from app_model.types import CommandRule, MenuItem

# TODO: This will be made public in some future napari version
from napari._app_model import get_app
from napari._app_model import get_app_model

from midi_app_controller.actions.actions_handler import ActionsHandler
from midi_app_controller.actions.bound_controller import BoundController
Expand Down Expand Up @@ -364,7 +364,7 @@ def get_state_manager() -> StateManager:
"""Returns the `StateManager` singleton."""
global _STATE_MANAGER
if _STATE_MANAGER is None:
register_custom_napari_actions(get_app())
_STATE_MANAGER = StateManager(get_app())
register_custom_napari_actions(get_app_model())
_STATE_MANAGER = StateManager(get_app_model())
_STATE_MANAGER.load_state()
return _STATE_MANAGER
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
"Programming Language :: Python",
]
dependencies = [
"napari[all]>=0.4.19",
"napari[all]>=0.5.4",
"python-rtmidi>=1.5.8",
"pyyaml>=6.0.1",
"pydantic>=2.7.1",
Expand Down
Loading