Skip to content

Commit a528937

Browse files
committed
debug undi redo fct
1 parent bbecc08 commit a528937

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
pull_request:
87

98
jobs:
109
lint:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ pip-log.txt
222222
.coveralls.yml
223223
.dockerignore
224224
.tox
225+
.mypycahe/
225226

226227
#Translations
227228
#*.mo

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| **Builds & Tests** | [![Linux](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml) [![Windows](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml) |
1010
| **PyPI** | [![PyPI Version](https://img.shields.io/pypi/v/devsimpy)](https://pypi.org/project/devsimpy/) [![Supported Versions](https://img.shields.io/pypi/pyversions/devsimpy?logo=python&logoColor=white)](https://pypi.org/project/devsimpy/) [![Supported Implementations](https://img.shields.io/pypi/implementation/devsimpy)](https://pypi.org/project/devsimpy/) [![Wheel](https://img.shields.io/pypi/wheel/devsimpy)](https://pypi.org/project/devsimpy/) |
1111
| **Activity** | ![Last Commit](https://img.shields.io/github/last-commit/capocchi/devsimpy) [![Commits Since](https://img.shields.io/github/commits-since/capocchi/devsimpy/v5.1)](https://github.com/capocchi/devsimpy/commits) ![Maintained](https://img.shields.io/maintenance/yes/2025) [![PyPI Downloads](https://img.shields.io/pypi/dm/devsimpy)](https://pypi.org/project/devsimpy/) |
12-
| **QA** | [![CodeFactor](https://img.shields.io/codefactor/grade/github/capocchi/devsimpy?logo=codefactor)](https://www.codefactor.io/repository/github/capocchi/devsimpy) [![Flake8](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml) [![mypy](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml) |
12+
| **QA** | [![CodeFactor](https://img.shields.io/codefactor/grade/github/capocchi/devsimpy?logo=codefactor)](https://www.codefactor.io/repository/github/capocchi/devsimpy) [![Flake8 & mypy](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml) |
1313
| **Other** | [![License](https://img.shields.io/github/license/capocchi/devsimpy)](https://github.com/capocchi/DEVSimPy/blob/master/License) ![Language](https://img.shields.io/github/languages/top/capocchi/devsimpy) [![Requirements](https://dependency-dash.repo-helper.uk/github/capocchi/devsimpy/badge.svg)](https://dependency-dash.repo-helper.uk/github/capocchi/devsimpy/) |
1414

1515

devsimpy/Container.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,13 +2445,14 @@ def Undo(self):
24452445
sys.stdout.write(_("Error trying to undo: %s \n"%info))
24462446
finally:
24472447

2448+
24482449
### just for init (white diagram)
24492450
if self.diagram.GetBlockCount()>=1:
24502451
mainW = self.GetTopLevelParent()
24512452

24522453
### toolBar
2453-
tb = mainW.FindWindowByName('tb')
2454-
2454+
tb = mainW.GetToolBar()
2455+
24552456
tb.EnableTool(wx.ID_UNDO, True)
24562457

24572458
self.diagram.parent = self

devsimpy/DiagramNotebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def OnPageChanged(self, evt):
175175
canvas = self.GetPage(id)
176176
self.print_canvas = canvas
177177
self.print_size = self.GetSize()
178-
178+
179179
### action history
180180
if hasattr(self.parent, 'tb'):
181181
self.parent.tb.EnableTool(wx.ID_UNDO, not len(canvas.stockUndo) == 0)

0 commit comments

Comments
 (0)