dependabot[bot] on pip
danyeaw on pip
danyeaw on master
Bump pygments from 2.7.3 to 2.7… (compare)
danyeaw on pip
danyeaw on master
Bump tox from 3.21.0 to 3.21.1 … (compare)
amolenaar on 3.0.0-beta.6
Bump version to 3.0.0-beta.5 Fix selection for items Remove Connector.allow, use Con… and 4 more (compare)
amolenaar on 3.0.0-beta.6
amolenaar on 3.0.0-beta.6
Bump version to 3.0.0-beta.5 Fix selection for items Remove Connector.allow, use Con… and 3 more (compare)
dependabot[bot] on pip
Bump tox from 3.21.0 to 3.21.1 … (compare)
dependabot[bot] on pip
Bump pygments from 2.7.3 to 2.7… (compare)
dependabot[bot] on pip
Bump pygments from 2.7.3 to 2.7… (compare)
danyeaw on remove-state-module
danyeaw on master
Remove gaphas.state module 'Refactored by Sourcery' Merge branch 'master' into remo… and 2 more (compare)
danyeaw on remove-state-module
Fix mypy error for incompatible… (compare)
danyeaw on remove-state-module
[pre-commit.ci] pre-commit auto… Bump sphinx-rtd-theme from 0.5.… Bump sphinx from 3.4.1 to 3.4.2… and 13 more (compare)
amolenaar on 3.0.0-beta.5
Bump version to 3.0.0-beta.5 (compare)
amolenaar on 3.0.0b5
amolenaar on 3.0.0b5
amolenaar on pip
amolenaar on master
Bump tox from 3.20.1 to 3.21.0 … Merge pull request #195 from ga… (compare)
Gaphor.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Users/runner/work/gaphor/gaphor/macos-dmg/Gaphor.app/Contents/Frameworks/Python.framework
I'm trying to fix the undo behaviour "once and for all". It proves trickier than I expected, though.
I think I'm almost there: gaphor/gaphor#588.
I think the new solution will be more solid. For one it recreates elements on undo, instead of reusing the old elements. Reusing the old presentation gave some trouble.
from gaphor import UML3
from gaphor import UML
from gaphor.diagram.presentation import LinePresentation
from gaphor.diagram.shapes import Box, Text, EditableText
from gaphor.diagram.support import represents
from gaphor.UML.modelfactory import stereotypes_str
@represents(UML3.Formal)
class FormalItem(LinePresentation):
def __init__(self, id=None, model=None):
super().__init__(id, model)
self.shape_middle = Text(
text=lambda: stereotypes_str(self.subject, ("Formal",)),
)
self.watch("subject[NamedElement].name")
self.watch("subject.appliedStereotype.classifier.name")
def draw_head(self, context):
cr = context.cairo
cr.move_to(0, 0)
cr.line_to(15, -10)
cr.line_to(15, 10)
cr.close_path()
cr.stroke()
cr.move_to(15, 0)