diff --git a/ThumbnailListShare.js b/ThumbnailListShare.js
new file mode 100644
index 00000000..68d2d871
--- /dev/null
+++ b/ThumbnailListShare.js
@@ -0,0 +1,3 @@
+.pragma library
+
+var isFaverDoubleClicked = true
diff --git a/src/deepin-album.qrc b/src/deepin-album.qrc
index a27fc638..5a4c1f87 100644
--- a/src/deepin-album.qrc
+++ b/src/deepin-album.qrc
@@ -78,5 +78,6 @@
qml/Control/MonthImage.qml
qml/Control/Animation/SwitchViewAnimation.qml
qml/Control/Animation/FadeInoutAnimation.qml
+ qml/Control/ListView/ThumbnailListShare.js
diff --git a/src/qml/Control/ListView/ThumbnailListDelegate.qml b/src/qml/Control/ListView/ThumbnailListDelegate.qml
index aefcd33f..e80f25ce 100644
--- a/src/qml/Control/ListView/ThumbnailListDelegate.qml
+++ b/src/qml/Control/ListView/ThumbnailListDelegate.qml
@@ -13,7 +13,7 @@ import org.deepin.dtk 1.0
import Qt5Compat.GraphicalEffects
import org.deepin.album 1.0 as Album
-
+import "ThumbnailListShare.js" as Share
import "../"
import "../../"
import "./"
@@ -380,6 +380,11 @@ Item {
}
mouse.accepted = true
+ Share.isFaverDoubleClicked = false
+ }
+ onDoubleClicked: (mouse)=> {
+ mouse.accepted = true
+ Share.isFaverDoubleClicked = true
}
}
}
diff --git a/src/qml/Control/ListView/ThumbnailListShare.js b/src/qml/Control/ListView/ThumbnailListShare.js
new file mode 100644
index 00000000..5487c6f2
--- /dev/null
+++ b/src/qml/Control/ListView/ThumbnailListShare.js
@@ -0,0 +1,3 @@
+.pragma library
+
+var isFaverDoubleClicked = false
diff --git a/src/qml/Control/ListView/ThumbnailListViewAlbum.qml b/src/qml/Control/ListView/ThumbnailListViewAlbum.qml
index 8a82a26b..f144beca 100644
--- a/src/qml/Control/ListView/ThumbnailListViewAlbum.qml
+++ b/src/qml/Control/ListView/ThumbnailListViewAlbum.qml
@@ -18,7 +18,7 @@ import "../../PreviewImageViewer"
import "../../PreviewImageViewer/Utils"
import "ThumbnailListViewTools.js" as ThumbnailTools
-
+import "ThumbnailListShare.js" as Share
FocusScope {
id : main
@@ -322,12 +322,15 @@ FocusScope {
// 单击模式点击/双击模式双击打开图片
if (Qt.styleHints.singleClickActivation || bDbClicked || mouse.source === Qt.MouseEventSynthesizedByQt) {
var c = clickedItem.mapToItem(mainStack, 0, 0)
- ThumbnailTools.executeViewImage(c.x, c.y, clickedItem.width, clickedItem.height)
+ console.log(Share.isFaverDoubleClicked)
+ if (!Share.isFaverDoubleClicked)
+ ThumbnailTools.executeViewImage(c.x, c.y, clickedItem.width, clickedItem.height)
}
else {
bDbClicked = true;
dbClickTimer.interval = Qt.styleHints.mouseDoubleClickInterval;
dbClickTimer.start();
+ Share.isFaverDoubleClicked = false;
}
}