mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-13 12:55:05 -05:00
Simba: Fix tab closing depending on the Sender.
This commit is contained in:
parent
1265e35aef
commit
abcb1065e6
@ -1637,8 +1637,13 @@ end;
|
||||
|
||||
procedure TSimbaForm.ActionCloseTabExecute(Sender: TObject);
|
||||
begin
|
||||
if(PageControl1.PageCount > 1)then
|
||||
Self.DeleteTab(TTabSheet(Sender).TabIndex,false)
|
||||
if(PageControl1.PageCount > 1) then
|
||||
begin
|
||||
if Sender is TTabSheet then
|
||||
Self.DeleteTab(TTabSheet(Sender).TabIndex,false)
|
||||
else
|
||||
Self.DeleteTab(PageControl1.TabIndex,false)
|
||||
end
|
||||
else
|
||||
Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way.
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user