diplayed map is closed by single-click, instead of double-click
authorpavelpa <pavelpa@localhost>
Tue, 19 Jan 2010 16:46:29 +0000 (16:46 +0000)
committerpavelpa <pavelpa@localhost>
Tue, 19 Jan 2010 16:46:29 +0000 (16:46 +0000)
src/gui/mapwindow.cpp
src/gui/mapwindow.h

index 7869f97..939989b 100644 (file)
@@ -9,8 +9,12 @@ MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aPare
     map->setPixmap(aImage);
 }
 
-void MapWindow::mouseDoubleClickEvent(QMouseEvent *event)
+// it is enough to handle mouseReleaseEvent, instead of
+// getting/creating mouseClikEvent, since the whole window
+// is occupied by only-one widget/label (image/map)
+void MapWindow::mouseReleaseEvent(QMouseEvent *event)
 {
+    Q_UNUSED(event);
     close();
 }
 
index 560da63..23ca356 100644 (file)
@@ -11,7 +11,7 @@ public:
     MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent = NULL);
     ~MapWindow() {}
 protected:
-    virtual void mouseDoubleClickEvent(QMouseEvent *event);
+    virtual void mouseReleaseEvent(QMouseEvent *event);
 };
 
 #endif /* MAPWINDOW_H */