Bump Gaphas to 3.0.0b4
Add callback handlers for Position and original values for Variable and Matrix.
This commit is contained in:
@ -260,7 +260,7 @@ class InterfaceItem(ElementPresentation, Classified):
|
||||
|
||||
def pre_update(self, context):
|
||||
connected_items = [
|
||||
c.item for c in self._connections.get_connections(connected=self)
|
||||
c.item for c in self.diagram.connections.get_connections(connected=self)
|
||||
]
|
||||
connectors = any(
|
||||
map(lambda i: isinstance(i.subject, UML.Connector), connected_items)
|
||||
@ -332,7 +332,7 @@ class InterfaceItem(ElementPresentation, Classified):
|
||||
if connectors is None:
|
||||
# distinguish between None and []
|
||||
connected_items = [
|
||||
c.item for c in self._connections.get_connections(connected=self)
|
||||
c.item for c in self.diagram.connections.get_connections(connected=self)
|
||||
]
|
||||
connectors = any(
|
||||
map(lambda i: isinstance(i.subject, UML.Connector), connected_items)
|
||||
|
@ -1,4 +1,4 @@
|
||||
"""Unnit tests for AssociationItem."""
|
||||
"""Unit tests for AssociationItem."""
|
||||
|
||||
from gaphor import UML
|
||||
from gaphor.tests import TestCase
|
||||
|
@ -138,6 +138,7 @@ class LifelineItem(ElementPresentation[UML.Lifeline], Named):
|
||||
def __init__(self, diagram, id=None):
|
||||
super().__init__(diagram, id)
|
||||
|
||||
self._connections = diagram.connections
|
||||
self.is_destroyed = False
|
||||
|
||||
self.lifetime = LifetimeItem()
|
||||
|
@ -103,7 +103,6 @@ class Presentation(Matrices, Element, Generic[S]):
|
||||
if diagram:
|
||||
diagram.connections.remove_connections_to_item(self)
|
||||
self.unlink()
|
||||
self.handle(DiagramItemDeleted(diagram, self))
|
||||
if event.new_value:
|
||||
raise ValueError("Can not change diagram for a presentation")
|
||||
|
||||
|
@ -98,7 +98,7 @@ def test_line_handle_position(diagram, undo_manager, event_manager):
|
||||
|
||||
undo_manager.undo_transaction()
|
||||
|
||||
assert tuple(handle.pos) == (0, 0)
|
||||
assert handle.pos.tuple() == (0, 0)
|
||||
|
||||
undo_manager.redo_transaction()
|
||||
|
||||
|
669
poetry.lock
generated
669
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user