OSDN Git Service

PATCH: [ 1229315 ] Fix item number for non-recursive compare
authorKimmo Varis <kimmov@gmail.com>
Wed, 29 Jun 2005 13:46:02 +0000 (13:46 +0000)
committerKimmo Varis <kimmov@gmail.com>
Wed, 29 Jun 2005 13:46:02 +0000 (13:46 +0000)
Src/DirView.cpp
Src/readme.txt

index fe10407..8fa907f 100644 (file)
@@ -2552,10 +2552,22 @@ void CDirView::OnUpdateStatusNum(CCmdUI* pCmdUI)
        {
                // An item has focus
                CString sIdx, sCnt;
-               sIdx.Format(_T("%ld"), focusItem+1);
-               sCnt.Format(_T("%ld"), count);
-               // "Item %1 of %2"
-               AfxFormatString2(s, IDS_DIRVIEW_STATUS_FMT_FOCUS, sIdx, sCnt); 
+               // Don't show number to special items
+               POSITION pos = GetItemKey(focusItem);
+               if (pos != (POSITION) SPECIAL_ITEM_POS)
+               {
+                       // If compare is non-recursive reduce special items count
+                       BOOL bRecursive = GetDocument()->GetRecursive();
+                       if (!bRecursive)
+                       {
+                               --focusItem;
+                               --count;
+                       }
+                       sIdx.Format(_T("%ld"), focusItem+1);
+                       sCnt.Format(_T("%ld"), count);
+                       // "Item %1 of %2"
+                       AfxFormatString2(s, IDS_DIRVIEW_STATUS_FMT_FOCUS, sIdx, sCnt);
+               }
        }
        pCmdUI->SetText(s);
 }
index 28f1df2..118d2c3 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-29 Kimmo
+ PATCH: [ 1229315 ] Fix item number for non-recursive compare
+  Src: DirView.cpp
+
 2005-06-27 Christian
  PATCH: [ 1219818 ] Plugin to display XML files
   Two new dirs added: