Fix access violation on actived grid editors (enum, date, set) when the grid got reloaded. Fixes bug #893 and bug #883.

This commit is contained in:
Ansgar Becker
2008-12-02 23:14:53 +00:00
parent 9deb5391cd
commit 6b2c95df14

View File

@@ -1328,6 +1328,11 @@ begin
viewingdata := true;
sl_query := TWideStringList.Create();
// Ensure grid has left editing mode so DataGrid.OnNewText applies its changes
// to the old data, not to the new or some non referenced data
if DataGrid.IsEditing then
DataGrid.EndEditNode;
// Post pending update and set post + cancel buttons to valid state
if DataGridHasChanges then
Mainform.actDataPostChangesExecute(Sender);