fix #118,raise window for hovering files over task

pull/1/head
Michail Vourlakos 8 years ago
parent 3f0cf2ba1a
commit aca9b22281

@ -75,6 +75,7 @@ Item {
onDragEnter:{ onDragEnter:{
if(root.dragSource == null){ if(root.dragSource == null){
onlyLaunchers = false;
root.dropNewLauncher = true; root.dropNewLauncher = true;
var createLaunchers = event.mimeData.urls.every(function (item) { var createLaunchers = event.mimeData.urls.every(function (item) {
@ -125,7 +126,7 @@ Item {
//I use the ignoredItem in order to reduce the move calls as much //I use the ignoredItem in order to reduce the move calls as much
//as possible //as possible
if (tasksModel.sortMode == TaskManager.TasksModel.SortManual && root.dragSource && ignoredItem == null) { if (tasksModel.sortMode == TaskManager.TasksModel.SortManual && root.dragSource && ignoredItem == null) {
var insertAt = TaskTools.insertIndexAt(above, event.x, event.y); var insertAt = TaskTools.insertIndexAt(above, event.x, event.y);
if (root.dragSource != above && root.dragSource.itemIndex != insertAt) { if (root.dragSource != above && root.dragSource.itemIndex != insertAt) {
// console.log(root.dragSource.itemIndex + " - "+insertAt); // console.log(root.dragSource.itemIndex + " - "+insertAt);
@ -136,11 +137,11 @@ Item {
} else if (!root.dragSource && above && hoveredItem != above) { } else if (!root.dragSource && above && hoveredItem != above) {
hoveredItem = above; hoveredItem = above;
root.dropNewLauncher = true; root.dropNewLauncher = true;
// activationTimer.restart(); activationTimer.restart();
} else if (!above) { } else if (!above) {
root.dropNewLauncher = true; root.dropNewLauncher = true;
hoveredItem = null; hoveredItem = null;
// activationTimer.stop(); activationTimer.stop();
} }
} }
@ -172,12 +173,16 @@ Item {
repeat: false repeat: false
onTriggered: { onTriggered: {
/* if (parent.hoveredItem.m.IsGroupParent === true) { if (dropHandler.onlyLaunchers) {
groupDialog.visualParent = parent.hoveredItem; return;
groupDialog.visible = true; }
if (parent.hoveredItem.m.IsGroupParent === true) {
// groupDialog.visualParent = parent.hoveredItem;
// groupDialog.visible = true;
} else if (parent.hoveredItem.m.IsLauncher !== true) { } else if (parent.hoveredItem.m.IsLauncher !== true) {
tasksModel.requestActivate(parent.hoveredItem.modelIndex()); tasksModel.requestActivate(parent.hoveredItem.modelIndex());
}*/ }
} }
} }
} }

Loading…
Cancel
Save