mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-21 16:55:01 -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);
|
procedure TSimbaForm.ActionCloseTabExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if(PageControl1.PageCount > 1)then
|
if(PageControl1.PageCount > 1) then
|
||||||
Self.DeleteTab(TTabSheet(Sender).TabIndex,false)
|
begin
|
||||||
|
if Sender is TTabSheet then
|
||||||
|
Self.DeleteTab(TTabSheet(Sender).TabIndex,false)
|
||||||
|
else
|
||||||
|
Self.DeleteTab(PageControl1.TabIndex,false)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way.
|
Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way.
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user