mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix unwanted enabling FModified flag in user manager dialog, when just switching the main tab to "Limitations", followed by a crash due to no focused user. Closes #493.
This commit is contained in:
@@ -412,7 +412,9 @@ procedure TUserManagerForm.Modification(Sender: TObject);
|
||||
var
|
||||
User: PUser;
|
||||
begin
|
||||
if Assigned(listUsers.FocusedNode) and (TWinControl(Sender).Parent = tabLimitations) then begin
|
||||
if not Assigned(listUsers.FocusedNode) then
|
||||
Exit;
|
||||
if TWinControl(Sender).Parent = tabLimitations then begin
|
||||
// Any TUpDown triggers a OnChange event on its TEdit when the UpDown gets painted
|
||||
User := listUsers.GetNodeData(listUsers.FocusedNode);
|
||||
Modified := Modified
|
||||
@@ -420,8 +422,9 @@ begin
|
||||
or (editMaxUpdates.Text <> IntToStr(User.MaxUpdates))
|
||||
or (editMaxConnections.Text <> IntToStr(User.MaxConnections))
|
||||
or (editMaxUserConnections.Text <> IntToStr(User.MaxUserConnections));
|
||||
end else
|
||||
end else begin
|
||||
Modified := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user