[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam] core/app/items: optimize manual sorting
From:       Maik Qualmann <null () kde ! org>
Date:       2018-07-31 21:08:55
Message-ID: E1fkbt1-0000kv-O0 () code ! kde ! org
[Download RAW message or body]

Git commit 704ecb9b776ca8aa5b3ea6c4cc254d108d7c8a4b by Maik Qualmann.
Committed on 31/07/2018 at 21:08.
Pushed by mqualmann into branch 'master'.

optimize manual sorting

M  +1    -2    core/app/items/digikamimageview.cpp

https://commits.kde.org/digikam/704ecb9b776ca8aa5b3ea6c4cc254d108d7c8a4b

diff --git a/core/app/items/digikamimageview.cpp b/core/app/items/digikamimageview.cpp
index 5384bb5956..31ea8a7e3c 100644
--- a/core/app/items/digikamimageview.cpp
+++ b/core/app/items/digikamimageview.cpp
@@ -243,7 +243,6 @@ void DigikamImageView::dragDropSort(const ImageInfo& pick, const QList<ImageInfo
             }
 
             info.setManualOrder(counter);
-            counter += (order ? 1 : -1);
             found    = true;
         }
         else if (found && !infos.contains(info))
@@ -254,8 +253,8 @@ void DigikamImageView::dragDropSort(const ImageInfo& pick, const QList<ImageInfo
                 break;
             }
 
-            info.setManualOrder(counter);
             counter += (order ? 100 : -100);
+            info.setManualOrder(counter);
         }
 
         group.allowLift();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic