Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-08-03 Kimmo
+ PATCH: [ 1533457 ] Add Refresh Selected -item to Folder compare main menu
+ Src: DirActions.cpp DirView.cpp DirView.h Merge.rc
+ Src/Languages/*: Merge*.rc
+
2006-08-02 Kimmo
PATCH: [ 1532743 ] Improve difference count columns in folder compare
Src: DiffItem.h DiffItemList.cpp DirScan.cpp DirVierwColItems.cpp
/**
* @brief Mark selected items as needing for rescan.
+ * @return Count of items to rescan.
*/
-void CDirView::MarkForRescan()
+UINT CDirView::MarkSelectedForRescan()
{
int sel = -1;
CString slFile, srFile;
+ int items = 0;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
+ // Don't try to rescan special items
+ if (GetItemKey(sel) == (POSITION)SPECIAL_ITEM_POS)
+ continue;
+
DIFFITEM di = GetDiffItem(sel);
GetDocument()->SetDiffStatus(0, DIFFCODE::TEXTFLAGS | DIFFCODE::SIDEFLAGS | DIFFCODE::COMPAREFLAGS, sel);
GetDocument()->SetDiffStatus(DIFFCODE::NEEDSCAN, DIFFCODE::SCANFLAGS, sel);
+ ++items;
}
- GetDocument()->SetMarkedRescan();
+ if (items > 0)
+ GetDocument()->SetMarkedRescan();
+ return items;
}
/**
/**
* @brief Called when item is marked for rescan.
+ * This function marks selected items for rescan and rescans them.
*/
void CDirView::OnMarkedRescan()
{
- GetDocument()->SetMarkedRescan();
- MarkForRescan();
- GetDocument()->Rescan();
+ UINT items = MarkSelectedForRescan();
+ if (items > 0)
+ GetDocument()->Rescan();
}
/**
BOOL ConfirmActionList(const FileActionScript & actions, int selCount);
void PerformActionList(FileActionScript & actions);
void UpdateAfterFileScript(FileActionScript & actionList);
- void MarkForRescan();
+ UINT MarkSelectedForRescan();
void DoFileEncodingDialog();
void DoUpdateFileEncodingDialog(CCmdUI* pCmdUI);
BOOL DoItemRename(LPCTSTR szNewItemName);
MENUITEM "&Options...", ID_OPTIONS
MENUITEM SEPARATOR
MENUITEM "Refre&sh\tF5", ID_REFRESH
+ MENUITEM "&Refresh Selected\tCtrl+F5", ID_DIR_RESCAN
END
POPUP "&View"
BEGIN
VK_F3, ID_EDIT_REPEAT, VIRTKEY, CONTROL, NOINVERT
VK_F4, ID_SELECTLINEDIFF, VIRTKEY, NOINVERT
VK_F5, ID_REFRESH, VIRTKEY, NOINVERT
+ VK_F5, ID_DIR_RESCAN, VIRTKEY, CONTROL, NOINVERT
VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT
VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT
VK_F9, ID_FILE_MERGINGMODE, VIRTKEY, NOINVERT