Skip to content

Commit

Permalink
To fix issue #42: No records insert to m_ScenarioManagementUpdatedFie…
Browse files Browse the repository at this point in the history
…lds when it is needed.
  • Loading branch information
wuwwen committed Aug 23, 2024
1 parent 0597924 commit 9e99316
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mikeplus/datatableaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from System.Data import ConnectionState
from DHI.Amelia.DataModule.Services.DataSource import BaseDataSource
from DHI.Amelia.DataModule.Services.DataTables import DataTableContainer

from DHI.Amelia.DataModule.Services.DataTables import AmlUndoRedoManager

class DataTableAccess:
'''
Expand Down Expand Up @@ -56,11 +56,13 @@ def open_database(self):
datatables.SetActiveModel(data_source.ActiveModel)
datatables.SetEumAppUnitSystem(data_source.UnitSystemOption)
datatables.OnResetContainer(None, None)
datatables.UndoRedoManager = AmlUndoRedoManager()
self._datatables = datatables

def close_database(self):
"""Close database
"""
self._datatables.UndoRedoManager.ClearUndoRedoBuffer()
self._datatables.DataSource.CloseDatabase()
self._datatables.Dispose()
self._datatables = None
Expand Down

0 comments on commit 9e99316

Please sign in to comment.