From e1d76db62db07d68ac1cecc63bb9d0de6bc7d179 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 17 Sep 2007 23:23:29 +0000 Subject: [PATCH] Suppress exception message about not finding the ActiveDatabase node in dbtree when a) option "Remember last used database" is active b) the last used db was dropped externally or the session was just opened with "OnlyDBs" in place and the last db is not contained in this list. --- source/childwin.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/childwin.pas b/source/childwin.pas index bc82b69e..64736cf0 100644 --- a/source/childwin.pas +++ b/source/childwin.pas @@ -886,7 +886,13 @@ begin // Reselect last used database if ( ( MainForm.GetRegValue( 'RestoreLastUsedDB', true ) ) and ( lastUsedDB <> '' ) ) then begin - ActiveDatabase := lastUsedDB; + try + ActiveDatabase := lastUsedDB; + except + // Suppress exception message when db was dropped externally or + // the session was just opened with "OnlyDBs" in place and the + // last db is not contained in this list. + end; end; // Set the grid-cells to always-edit-mode.