mapview-patch

Reimar Imhof <[email protected]> Mon, 28 Dec 2020 16:33:19 +0100
Newsgroups gmane.comp.kde.kimdaba
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--nextPart7854679.T7Z3S40VBb
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Hi,
attached is a small patch for the mapview.

Background:
It's possible to select images by dragging a rectangle around the images 
(press ctrl, left mouse button and move mouse).
When you just click you (may) select an image cluster.

The patch is very simple: Before selecting an image cluster there's not only a 
test for the left mouse button but also an test for the ctrl button. If ctrl 
is pressed no cluster will be selected.

Please have a look and push the patch to the git repository.

Thanks,
Reimar

--nextPart7854679.T7Z3S40VBb
Content-Disposition: attachment; filename="kphotoalbum-mapview-ctrlmod.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="utf-8"; name="kphotoalbum-mapview-ctrlmod.patch"

diff --git a/Map/MapView.cpp b/Map/MapView.cpp
index dd00d5fe..5a214094 100644
--- a/Map/MapView.cpp
+++ b/Map/MapView.cpp
@@ -417,7 +417,7 @@ bool Map::MapView::regionSelected() const
 
 void Map::MapView::mousePressEvent(QMouseEvent *event)
 {
-    if (event->button() != Qt::LeftButton)
+    if ((event->button() != Qt::LeftButton) || ((event->modifiers() & Qt::ControlModifier) != 0))
         return;
 
     qCDebug(MapLog) << "Map clicked.";

--nextPart7854679.T7Z3S40VBb
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
KPhotoAlbum mailing list
[email protected]
https://mail.kdab.com/mailman/listinfo/kphotoalbum

--nextPart7854679.T7Z3S40VBb--