Ignore:
Timestamp:
Mar 11, 2011, 10:57:39 AM (14 years ago)
Author:
george
Message:
  • Fixed: Infinite loop in TCDManager SetVisible method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r192 r193  
    1111type
    1212
    13   { TCDStyleTabs }
    14 
    15   TCDStyleTabs = class(TCDManager)
     13  { TCDManagerTabs }
     14
     15  TCDManagerTabs = class(TCDManager)
    1616  public
    1717    MouseDown: Boolean;
     
    3535  public
    3636    constructor Create(ADockSite: TWinControl);
    37     procedure DoSetVisible(const AValue: Boolean);
     37    procedure DoSetVisible(const AValue: Boolean); override;
    3838    destructor Destroy; override;
    3939    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
     
    4949  UCDClient;
    5050
    51 { TCDStyleTabs }
    52 
    53 procedure TCDStyleTabs.PopupMenuTabCloseClick(Sender: TObject);
     51{ TCDManagerTabs }
     52
     53procedure TCDManagerTabs.PopupMenuTabCloseClick(Sender: TObject);
    5454begin
    5555  if Assigned(PageControl.ActivePage) then
     
    5757end;
    5858
    59 procedure TCDStyleTabs.TabControlMouseLeave(Sender: TObject);
     59procedure TCDManagerTabs.TabControlMouseLeave(Sender: TObject);
    6060begin
    6161  if MouseDown then
     
    6767end;
    6868
    69 procedure TCDStyleTabs.TabControlChange(Sender: TObject);
     69procedure TCDManagerTabs.TabControlChange(Sender: TObject);
    7070var
    7171  I: Integer;
     
    120120end;
    121121
    122 procedure TCDStyleTabs.TabControlMouseDown(Sender: TObject;
     122procedure TCDManagerTabs.TabControlMouseDown(Sender: TObject;
    123123  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    124124begin
     
    130130end;
    131131
    132 procedure TCDStyleTabs.TabControlMouseUp(Sender: TObject;
     132procedure TCDManagerTabs.TabControlMouseUp(Sender: TObject;
    133133  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    134134begin
     
    136136end;
    137137
    138 constructor TCDStyleTabs.Create(ADockSite: TWinControl);
     138constructor TCDManagerTabs.Create(ADockSite: TWinControl);
    139139var
    140140  NewMenuItem: TMenuItem;
     
    144144begin
    145145  inherited;
     146  FDockStyle := dsTabs;
    146147  TabImageList := TImageList.Create(ADockSite); //FDockSite);
    147148  with TabImageList do begin
     
    177178end;
    178179
    179 destructor TCDStyleTabs.Destroy;
     180destructor TCDManagerTabs.Destroy;
    180181begin
    181182  PageControl.Free;
     
    184185end;
    185186
    186 procedure TCDStyleTabs.Switch(Index: Integer);
     187procedure TCDManagerTabs.Switch(Index: Integer);
    187188begin
    188189  PageControl.TabIndex := Index;
    189190end;
    190191
    191 procedure TCDStyleTabs.InsertControlNoUpdate(AControl: TControl; InsertAt: TAlign);
     192procedure TCDManagerTabs.InsertControlNoUpdate(AControl: TControl; InsertAt: TAlign);
    192193var
    193194  NewTabSheet: TTabSheet;
     
    232233end;
    233234
    234 procedure TCDStyleTabs.RemoveControl(Control: TControl);
     235procedure TCDManagerTabs.RemoveControl(Control: TControl);
    235236begin
    236237  inherited RemoveControl(Control);
    237238end;
    238239
    239 procedure TCDStyleTabs.InsertControlPanel(AControl: TControl; InsertAt: TAlign;
     240procedure TCDManagerTabs.InsertControlPanel(AControl: TControl; InsertAt: TAlign;
    240241  DropCtl: TControl);
    241242var
     
    247248end;
    248249
    249 procedure TCDStyleTabs.UpdateClientSize;
     250procedure TCDManagerTabs.UpdateClientSize;
    250251var
    251252  I: Integer;
     
    259260end;
    260261
    261 procedure TCDStyleTabs.DoSetVisible(const AValue: Boolean);
    262 begin
     262procedure TCDManagerTabs.DoSetVisible(const AValue: Boolean);
     263begin
     264  inherited;
    263265    if (PageControl.TabIndex >= 0) and (PageControl.TabIndex < DockPanels.Count) then
    264266      with TCDClientPanel(DockPanels[PageControl.TabIndex]) do begin
     
    274276end;
    275277
    276 procedure TCDStyleTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
     278procedure TCDManagerTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
    277279var
    278280  I: Integer;
     
    318320end;
    319321
    320 procedure TCDStyleTabs.SetTabsPos(const AValue: THeaderPos);
     322procedure TCDManagerTabs.SetTabsPos(const AValue: THeaderPos);
    321323begin
    322324  if FTabsPos = AValue then Exit;
Note: See TracChangeset for help on using the changeset viewer.