Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003752 [JEDI VCL] 00 JVCL Components minor always 2006-06-08 14:34 2006-06-09 01:19
Reporter Kiriakos View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.20
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.
Attached Files

- Relationships

-  Notes
(0009501)
Kiriakos (reporter)
2006-06-08 21:04

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.
(0009502)
Kiriakos (reporter)
2006-06-08 21:07

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.
(0009505)
obones (administrator)
2006-06-09 01:19

This is now in SVN.

- Issue History
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker