View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003752 | JEDI VCL | 00 JVCL Components | public | 2006-06-08 14:34 | 2006-06-09 01:19 |
Reporter | Kiriakos | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003752: JvDocking LoadDockTreeFromAppStorage error | ||||
Description | With JvDockVSNetStyle with a few forms docked in a TabHost you close one of them either using the mouse or via code (HideDockForm) and save the layout. When loading the layout again with LoadDockTreeFromAppStorage the form you closed (hidden) becomes visible and docked in the original tab host. I do not know whether this bug affects other styles. | ||||
Additional Information | Steps to replicate: - Open in Delphi the AdvancePro JvDocking Demo. - Change the DockStyle to JvDockVSNetStyle. - Run the demo - Create 3 VS Net style windows and dock them in TabHost on one of the sides - Close one of the 3 windows - Save the layout to Ini file (menu option) - Load the layout from Ini file (menu option) All three forms appear docked in the tabhost. | ||||
Tags | No tags attached. | ||||
|
The problem stems from the following code in JvDockControlForm.pas procedure TJvDockTabPageControl.SaveToStream(Stream: TStream); ... if (Self is TJvDockVSNETTabPageControl) and (ParentForm.HostDockSite is TJvDockPanel) then SheetVisible := Integer(TJvDockVSNETTabSheet(Pages[I]).OldVisible) else SheetVisible := SheetVisible + Integer(CurrentControl.Visible); ... When ones closes a form docked in a TabHost OldVisible does not get reset to False and when you save the layout the corresponded SheetVisible information is recorded as True. |
|
Solution: In file JvDockVSNetStyle.pas: procedure TJvDockVSNetStyle.SetDockFormVisible(ADockClient: TJvDockClient; AVisible: Boolean); Replace the following two lines if not Assigned(Channel) then Exit; with if not Assigned(Channel) then begin if ADockClient.ParentForm.Parent is TJvDockVSNETTabSheet then TJvDockVSNETTabSheet(ADockClient.ParentForm.Parent).OldVisible := AVisible; Exit; end; I have tested this solution and it does appear to work without any side effects. |
|
This is now in SVN. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-06-08 14:34 | Kiriakos | New Issue | |
2006-06-08 21:04 | Kiriakos | Note Added: 0009501 | |
2006-06-08 21:07 | Kiriakos | Note Added: 0009502 | |
2006-06-09 01:19 | obones | Status | new => resolved |
2006-06-09 01:19 | obones | Resolution | open => fixed |
2006-06-09 01:19 | obones | Assigned To | => obones |
2006-06-09 01:19 | obones | Note Added: 0009505 |