Git commit 31db5599d319361a0ae39ac0ef4f0e32c7a48fbc by Maik Qualmann. Committed on 31/07/2018 at 20:43. Pushed by mqualmann into branch 'master'. polish manual sorting M +2 -2 core/app/dragdrop/imagedragdrop.cpp M +1 -1 core/app/items/digikamimageview.cpp M +1 -1 core/libs/database/coredb/coredb.cpp M +1 -1 core/libs/database/coredb/coredb.h M +1 -1 core/libs/database/item/imageinfo.cpp M +1 -1 core/libs/database/item/imageinfo.h M +5 -0 core/libs/database/item/imageinfocache.cpp M +1 -1 core/libs/database/item/imageinfodata.h https://commits.kde.org/digikam/31db5599d319361a0ae39ac0ef4f0e32c7a48fbc diff --git a/core/app/dragdrop/imagedragdrop.cpp b/core/app/dragdrop/imaged= ragdrop.cpp index 6be10ced70..c802bb8cb2 100644 --- a/core/app/dragdrop/imagedragdrop.cpp +++ b/core/app/dragdrop/imagedragdrop.cpp @@ -195,14 +195,14 @@ static DropAction groupAction(const QDropEvent* const= , QWidget* const view) = QMenu popMenu(view); QAction* sortAction =3D 0; - QAction* const groupAction =3D addGroupAction(&popMenu); = if (sort =3D=3D ImageSortSettings::SortByManualOrder) { - popMenu.addSeparator(); sortAction =3D addSortAction(&popMenu); + popMenu.addSeparator(); } = + QAction* const groupAction =3D addGroupAction(&popMenu); popMenu.addSeparator(); addCancelAction(&popMenu); = diff --git a/core/app/items/digikamimageview.cpp b/core/app/items/digikamim= ageview.cpp index 57e6f1347a..5384bb5956 100644 --- a/core/app/items/digikamimageview.cpp +++ b/core/app/items/digikamimageview.cpp @@ -222,7 +222,7 @@ void DigikamImageView::dragDropSort(const ImageInfo& pi= ck, const QList getImageSorting() =3D=3D Qt::AscendingOrde= r); bool found =3D false; diff --git a/core/libs/database/coredb/coredb.cpp b/core/libs/database/core= db/coredb.cpp index decb87ecc7..5f73498a66 100644 --- a/core/libs/database/coredb/coredb.cpp +++ b/core/libs/database/coredb/coredb.cpp @@ -3771,7 +3771,7 @@ void CoreDB::setItemAlbum(qlonglong imageID, qlonglon= g album) d->db->recordChangeset(CollectionImageChangeset(imageID, album, Collec= tionImageChangeset::Added)); } = -void CoreDB::setItemManualOrder(qlonglong imageID, int value) +void CoreDB::setItemManualOrder(qlonglong imageID, qlonglong value) { QVariantList boundValues; boundValues << value << imageID; diff --git a/core/libs/database/coredb/coredb.h b/core/libs/database/coredb= /coredb.h index 76826f3d89..1c57b49f96 100644 --- a/core/libs/database/coredb/coredb.h +++ b/core/libs/database/coredb/coredb.h @@ -760,7 +760,7 @@ public: /** * Updates the manualOrder field for the item. */ - void setItemManualOrder(qlonglong imageID, int value); + void setItemManualOrder(qlonglong imageID, qlonglong value); = /** * Rename the item. diff --git a/core/libs/database/item/imageinfo.cpp b/core/libs/database/ite= m/imageinfo.cpp index e99dfb318f..05cdd9bde8 100644 --- a/core/libs/database/item/imageinfo.cpp +++ b/core/libs/database/item/imageinfo.cpp @@ -1674,7 +1674,7 @@ void ImageInfo::setRating(int value) m_data->ratingCached =3D true; } = -void ImageInfo::setManualOrder(int value) +void ImageInfo::setManualOrder(qlonglong value) { if (!m_data) { diff --git a/core/libs/database/item/imageinfo.h b/core/libs/database/item/= imageinfo.h index 94b346db77..2b01e31901 100644 --- a/core/libs/database/item/imageinfo.h +++ b/core/libs/database/item/imageinfo.h @@ -470,7 +470,7 @@ public: /** * Set the manul sorting order for the item */ - void setManualOrder(int value); + void setManualOrder(qlonglong value); = /** * Set the orientation for the item diff --git a/core/libs/database/item/imageinfocache.cpp b/core/libs/databas= e/item/imageinfocache.cpp index 0aebba6eeb..b41d754cbc 100644 --- a/core/libs/database/item/imageinfocache.cpp +++ b/core/libs/database/item/imageinfocache.cpp @@ -298,6 +298,11 @@ void ImageInfoCache::slotImageChanged(const ImageChang= eset& changeset) (*it)->fileSizeCached =3D false; } = + if (changes & DatabaseFields::ManualOrder) + { + (*it)->manualOrderCached =3D false; + } + if ((changes & DatabaseFields::Width) || (changes & DatabaseFi= elds::Height)) { (*it)->imageSizeCached =3D false; diff --git a/core/libs/database/item/imageinfodata.h b/core/libs/database/i= tem/imageinfodata.h index 42f1ef9089..c06d6b50fd 100644 --- a/core/libs/database/item/imageinfodata.h +++ b/core/libs/database/item/imageinfodata.h @@ -136,12 +136,12 @@ public: bool pickLabelCached : 1; bool colorLabelCached : 1; bool ratingCached : 1; - bool manualOrderCached : 1; bool categoryCached : 1; bool formatCached : 1; bool creationDateCached : 1; bool modificationDateCached : 1; bool fileSizeCached : 1; + bool manualOrderCached : 1; bool uniqueHashCached : 1; bool imageSizeCached : 1; bool tagIdsCached : 1;