diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a6a362..b843120 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: pip install buildlackey~=1.7.0 pip install orthogonal==1.3.1 pip install pyumldiagrams==3.1.20 - pip install pyforcedirectedlayout>=0.80.5 + pip install pyforcedirectedlayout>=0.80.6 pip install pyorthogonalrouting>=1.3.0 - run: name: run tests diff --git a/pyproject.toml b/pyproject.toml index 1cede45..7b82837 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ 'antlr4-python3-runtime==4.13.1', 'pyumldiagrams>=3.1.20', 'orthogonal>=1.3.1', - 'pyforcedirectedlayout>=0.80.5', + 'pyforcedirectedlayout>=0.80.6', 'pyorthogonalrouting>=1.3.0', ] [project.urls] diff --git a/requirements.txt b/requirements.txt index d83a098..49a76cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,5 +26,5 @@ oglio==2.3.4 orthogonal==1.3.1 pyumldiagrams==3.1.20 -pyforcedirectedlayout==0.80.5 +pyforcedirectedlayout==0.80.6 pyorthogonalrouting==1.3.0 diff --git a/src/pyutplugins/_version.py b/src/pyutplugins/_version.py index 1130673..18c325f 100644 --- a/src/pyutplugins/_version.py +++ b/src/pyutplugins/_version.py @@ -1 +1 @@ -__version__: str = '3.1.2' +__version__: str = '3.1.4' diff --git a/src/pyutplugins/toolplugins/ToolForceDirectedLayout.py b/src/pyutplugins/toolplugins/ToolForceDirectedLayout.py index 0260342..ede4350 100644 --- a/src/pyutplugins/toolplugins/ToolForceDirectedLayout.py +++ b/src/pyutplugins/toolplugins/ToolForceDirectedLayout.py @@ -123,6 +123,9 @@ def _buildNameDictionary(self, oglObjects: OglObjects): def _layoutStatusCallBack(self, status: LayoutStatus): + # noinspection PyProtectedMember + from wx._core import wxAssertionError + if self._layoutProgressDialog is None: self._layoutProgressDialog = ProgressDialog('Arranging', 'Starting', parent=None, style=PD_APP_MODAL | PD_ELAPSED_TIME) self._layoutProgressDialog.SetRange(status.maxIterations) @@ -132,7 +135,14 @@ def _layoutStatusCallBack(self, status: LayoutStatus): f'iterations: {status.iterations}\n' f'stopCount: {status.stopCount}\n' ) - self._layoutProgressDialog.Update(status.iterations, statusMsg) + try: + self._layoutProgressDialog.Update(status.iterations, statusMsg) + except RuntimeError as re: + self.logger.error(f'wxPython error: {re}') + self._layoutProgressDialog = ProgressDialog('Arranging', 'Starting', parent=None, style=PD_APP_MODAL | PD_ELAPSED_TIME) + self._layoutProgressDialog.SetRange(status.maxIterations) + except wxAssertionError as ae: + self.logger.error(f'{status.iterations=} {ae}') self._pluginAdapter.refreshFrame()