Fix bug #565: Post pending UPDATE when switching tables in data tab . To be exact, there are two events which call actDataPostChanges now: 1. Switching to another table or refreshing the current one and 2. closing the whole form .

This commit is contained in:
Ansgar Becker
2008-09-09 22:59:25 +00:00
parent f1ff6e3eb6
commit d93f3754f6

View File

@ -990,6 +990,10 @@ procedure TMDIChild.FormClose(Sender: TObject; var Action: TCloseAction);
var
reg : TRegistry;
begin
// Post pending UPDATE
if DataGridHasChanges then
Mainform.actDataPostChangesExecute(Sender);
SetWindowConnected( false );
SetWindowName( main.discname );
Application.Title := APPNAME;
@ -1294,8 +1298,9 @@ end;
begin
Screen.Cursor := crHourglass;
// Unposted row modifications get lost
DataGridHasChanges := False;
// Post pending UPDATE
if DataGridHasChanges then
Mainform.actDataPostChangesExecute(Sender);
viewingdata := true;
sl_query := TWideStringList.Create();
try