Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70998

[REG] Map + MouseArea double multi-touch problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.0 Beta 1
    • Fix Version/s: 5.12.0 RC
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      75132505ab7eba08f4c82aced31143960d4773a7 (qt/qtdeclarative/5.12.0)

      Description

      When the map is double clicked with multiple fingers (2 or more) then the MouseArea's "doubleClick" and "longPress" signals are not emitted anymore:

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.3
      
      import QtLocation 5.9
      import QtPositioning 5.8
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Map {
              id: map
              anchors.fill: parent
      
              plugin: Plugin {
                  name: "osm"
              }
      
              MouseArea {
                  anchors.fill: parent
                  acceptedButtons: Qt.LeftButton | Qt.RightButton
      
                  onDoubleClicked: {
                      var mouseGeoPos = map.toCoordinate(Qt.point(mouse.x, mouse.y));
                      var preZoomPoint = map.fromCoordinate(mouseGeoPos, false);
      
                      if (mouse.button === Qt.LeftButton) {
                          map.zoomLevel = Math.floor(map.zoomLevel)+1;
                      }
                      else if (mouse.button === Qt.RightButton) {
                          map.zoomLevel = Math.floor(map.zoomLevel)-1;
                      }
      
                      var postZoomPoint = map.fromCoordinate(mouseGeoPos, false);
                      var dx = postZoomPoint.x - preZoomPoint.x;
                      var dy = postZoomPoint.y - preZoomPoint.y;
      
                      var mapCenterPoint = Qt.point(map.width / 2.0 + dx, map.height / 2.0 + dy);
                      map.center = map.toCoordinate(mapCenterPoint);
                  }
              }
          }
      }

      The problem happens sometimes on Android, iOS, Windows RT. It can be best reproduced 100% on an iPhone 6 Plus (iOS 11).

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              paangele Paolo Angelelli
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes