mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fixed drop filtering in GridView.
This commit is contained in:
parent
c052a82195
commit
af235fb516
@ -415,33 +415,23 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//QTBUG-39453
|
|
||||||
//Another fu%$·#& bug in Qt
|
|
||||||
//https://bugreports.qt.io/browse/QTBUG-39453
|
|
||||||
//To solve this I am going to accept any input drag, drops will be filtered in "onDropped"
|
|
||||||
DropArea {
|
DropArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
/*
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
console.log("onEntered");
|
|
||||||
if(drag.hasUrls)
|
if(drag.hasUrls)
|
||||||
{
|
{
|
||||||
console.log("HAS URLS -> ", drag.urls);
|
|
||||||
if(dropManager.canDropUrls(drag.urls, drag.action))
|
if(dropManager.canDropUrls(drag.urls, drag.action))
|
||||||
{
|
{
|
||||||
drag.accepted = true;
|
drag.accepted = true;
|
||||||
console.log("canDropUrls");
|
|
||||||
}else
|
}else
|
||||||
drag.accepted = false;
|
drag.accepted = false;
|
||||||
}
|
}
|
||||||
else if (dropManager.canDropFormats(drag.formats)) {
|
else if (dropManager.canDropFormats(drag.formats)) {
|
||||||
drag.accepted = true;
|
drag.accepted = true;
|
||||||
console.log("canDropFormats");
|
|
||||||
} else
|
} else
|
||||||
drag.accepted = false;
|
drag.accepted = false;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
onDropped: {
|
onDropped: {
|
||||||
if(drop.hasUrls && dropManager.canDropUrls(drop.urls, drop.action))
|
if(drop.hasUrls && dropManager.canDropUrls(drop.urls, drop.action))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user