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.
This commit is contained in:
Ansgar Becker
2007-09-17 23:23:29 +00:00
parent 1dbc19b16d
commit e1d76db62d

View File

@ -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.