Permalink
Browse files

Table editor: Make it impossible to (accidentally) click the save but…

…ton twice. Closes #527
  • Loading branch information...
ansgarbecker committed Feb 10, 2019
1 parent c9f0073 commit 768bc001cb51143e5fdc2800a436a3ba11c55d4e
Showing with 6 additions and 1 deletion.
  1. +6 −1 source/table_editor.pas
@@ -372,8 +372,13 @@ procedure TfrmTableEditor.btnDiscardClick(Sender: TObject);

procedure TfrmTableEditor.btnSaveClick(Sender: TObject);
begin
// Save changes, and make it impossible to (accidentally) click the save button twice
btnSave.Enabled := False;
btnSave.Repaint;
if ApplyModifications = mrOK then
Init(DBObject);
Init(DBObject)
else // Re-enable save button when something went wrong
btnSave.Enabled := True;
end;


0 comments on commit 768bc00

Please sign in to comment.