From 6b64d12e4ed4a818d75c57c6b2cf481947249abd Mon Sep 17 00:00:00 2001 From: shunf4 Date: Sat, 11 May 2024 16:06:57 +0800 Subject: [PATCH] feat: go on cancel folder priority over file in comparison --- CPP/7zip/UI/FileManager/BrowseDialog.cpp | 8 ++++---- CPP/7zip/UI/FileManager/PanelSort.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CPP/7zip/UI/FileManager/BrowseDialog.cpp b/CPP/7zip/UI/FileManager/BrowseDialog.cpp index 6d2b6b55..5d7ef0ad 100644 --- a/CPP/7zip/UI/FileManager/BrowseDialog.cpp +++ b/CPP/7zip/UI/FileManager/BrowseDialog.cpp @@ -487,10 +487,10 @@ int CBrowseDialog::CompareItems(LPARAM lParam1, LPARAM lParam2) const CFileInfo &f1 = _files[(int)lParam1]; const CFileInfo &f2 = _files[(int)lParam2]; - bool isDir1 = f1.IsDir(); - bool isDir2 = f2.IsDir(); - if (isDir1 && !isDir2) return -1; - if (isDir2 && !isDir1) return 1; + // bool isDir1 = f1.IsDir(); + // bool isDir2 = f2.IsDir(); + // if (isDir1 && !isDir2) return -1; + // if (isDir2 && !isDir1) return 1; int res = 0; switch (_sortIndex) diff --git a/CPP/7zip/UI/FileManager/PanelSort.cpp b/CPP/7zip/UI/FileManager/PanelSort.cpp index a145d387..92251680 100644 --- a/CPP/7zip/UI/FileManager/PanelSort.cpp +++ b/CPP/7zip/UI/FileManager/PanelSort.cpp @@ -191,8 +191,8 @@ int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData) CPanel *panel = (CPanel*)lpData; - bool isDir1 = panel->IsItem_Folder((int)lParam1); - bool isDir2 = panel->IsItem_Folder((int)lParam2); + // bool isDir1 = panel->IsItem_Folder((int)lParam1); + // bool isDir2 = panel->IsItem_Folder((int)lParam2); // if (isDir1 && !isDir2) return -1; // if (isDir2 && !isDir1) return 1;