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
0004656 [JEDI VCL] 00 JVCL Components minor always 2009-01-10 02:32 2009-06-01 19:43
Reporter lomo74 View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.34
Summary 0004656: TJvTabBar with PageListTabLink=true shows wrong page after closing tab
Description If a TJvTabBar is linked with a TJvPageList and PageListTabLink is true, after closing a tab the TabBar is supposed to show either:
- the *next* page, if the closed tab index < pagecount - 1;
- the *previous* page, in the other case, but
- *no* page if pagecount = 1 (no pages left after closing this one)
A "shift by one" bug in TJvCustomPageList.RemovePage and TJvCustomPageList.FindNextPage prevents this from working correctly.
Proposed solution:
in TJvCustomPageList.RemovePage the first line should be
  NextPage := FindNextPage(APage, {True}(FPages.IndexOf(APage) < PageCount - 1), not (csDesigning in ComponentState));

in TJvCustomPageList.FindNextPage:
...
    repeat
      if GoForward then
      begin
        Inc(I);
{ if I >= FPages.Count - 1 then }
        if I > FPages.Count - 1 then
          I := 0;
      end
      else
      begin
{ if I <= 0 then }
        if I < 0 then
          I := FPages.Count - 1;
        Dec(I);
      end;
      Result := Pages[I];
      if IncludeDisabled or Result.Enabled then
        Exit;
    until I = StartIndex;
...

Regards
- Lorenzo -
Additional Information
Tags No tags attached.
Attached Files zip file icon issue4656.zip [^] (238,479 bytes) 2009-04-29 17:42

- Relationships

-  Notes
(0015233)
lomo74 (reporter)
2009-01-10 04:45

..OOOPS!!!...
The code attached previously did crash the IDE, sorry. This is fixed:

in TJvCustomPageList.FindNextPage:
...
    repeat
      if GoForward then
      begin
        Inc(I);
{ if I >= FPages.Count - 1 then }
        if I > FPages.Count - 1 then
          I := 0;
      end
      else
      begin
{ if I <= 0 then }
        Dec(I);
        if I < 0 then
          I := FPages.Count - 1;
      end;
      Result := Pages[I];
      if IncludeDisabled or Result.Enabled then
        Exit;
    until I = StartIndex;
...
(0015445)
obones (administrator)
2009-04-29 11:42

Please provide the zipped sources of a sample application showing this.
(0015496)
lomo74 (reporter)
2009-04-29 17:46

issue4656.zip uploaded.
ciao - Lorenzo -
(0015592)
AHUser (developer)
2009-06-01 19:43

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2009-01-10 02:32 lomo74 New Issue
2009-01-10 03:14 lomo74 Issue Monitored: lomo74
2009-01-10 04:45 lomo74 Note Added: 0015233
2009-02-02 01:21 obones Status new => acknowledged
2009-04-29 11:42 obones Note Added: 0015445
2009-04-29 11:42 obones Status acknowledged => feedback
2009-04-29 17:42 lomo74 File Added: issue4656.zip
2009-04-29 17:46 lomo74 Note Added: 0015496
2009-06-01 19:43 AHUser Issue Monitored: AHUser
2009-06-01 19:43 AHUser Issue End Monitor: AHUser
2009-06-01 19:43 AHUser Note Added: 0015592
2009-06-01 19:43 AHUser Status feedback => resolved
2009-06-01 19:43 AHUser Fixed in Version => Daily / SVN
2009-06-01 19:43 AHUser Resolution open => fixed
2009-06-01 19:43 AHUser Assigned To => AHUser


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