small patch to fix gps search

Reimar Imhof <[email protected]> Tue, 12 Nov 2019 22:21:49 +0100
Newsgroups gmane.comp.kde.kimdaba
Message-ID <[email protected]>
Hi,

I like the geo position feature in kphotoalbum.
Now I ran in this gps select/search issue:
1.) Select places, select a place --> all pictures tagged with that place are 
selected. That's expected. (Or you could select people or what ever.)
2.) Go to geo position and select some of the selected pictures by gps 
position. --> the selection doesn't change. That's not expected.

My patch is very simple:
In ImageSearchInfo I've seen a call to 
  m_matchGeneration = nextGeneration()
every time the search info is changed. As I couldn't find this call to 
nextGeneration() when setting the gps region (setRegionSelection(...)), I've 
just changed this.
Now I can select pictures by gps position even if I've allready selected by 
some categories or even gps positions.

Please have a look.

Cheers,
Reimar

_______________________________________________
KPhotoAlbum mailing list
[email protected]
https://mail.kdab.com/mailman/listinfo/kphotoalbum
kphotoalbum-gps-search.patch (text/x-patch, 440 B)
diff --git a/DB/ImageSearchInfo.cpp b/DB/ImageSearchInfo.cpp
index ed0098a5..e2680bc7 100644
--- a/DB/ImageSearchInfo.cpp
+++ b/DB/ImageSearchInfo.cpp
@@ -658,6 +658,7 @@ void ImageSearchInfo::setRegionSelection(const KGeoMap::GeoCoordinates::Pair &ac
     if (m_regionSelection.first.hasCoordinates() && m_regionSelection.second.hasCoordinates()) {
         m_isNull = false;
     }
+    m_matchGeneration = nextGeneration();
 }
 #endif