-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bumped core dependency * Moved back the singleton signal * Updated python requirement * Added selection API * Added library * Bumped macos minimum version
- Loading branch information
1 parent
0ae63e9
commit 962c39d
Showing
6 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from ._api import get_selection, set_selection, selection_changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from amulet.selection import SelectionGroup | ||
from amulet_editor.models.generic._singleton_signal import SingletonSignal | ||
|
||
|
||
_selection: SelectionGroup = SelectionGroup() | ||
|
||
_selection_changed_obj, selection_changed = SingletonSignal(SelectionGroup) | ||
|
||
|
||
def get_selection() -> SelectionGroup: | ||
return _selection | ||
|
||
|
||
def set_selection(selection: SelectionGroup) -> None: | ||
global _selection | ||
_selection = selection | ||
selection_changed.emit(selection) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters