mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 22:50:14 +03:00
fix int.separators indexes on dragging
--when there were many internal separators in the row and the user was dragging a task the internal separators indexes afterwards were broken. This fixes this by forcing the separators to update their indexes after the user finishes dragging.
This commit is contained in:
parent
8d40678e28
commit
c3a9d09ecf
@ -255,14 +255,18 @@ Item {
|
||||
|
||||
if (currentPos === -1 && taskIndex >=0){
|
||||
//add that separator
|
||||
//console.log("add separator:"+launcher+" at:"+taskIndex);
|
||||
separators.push({launcherUrl: launcher, index: taskIndex});
|
||||
updated = true;
|
||||
} else if (currentPos>-1 && taskIndex === -1) {
|
||||
//remove that separator
|
||||
//console.log("remove separator:"+launcher);
|
||||
separators.splice(currentPos,1);
|
||||
updated = true;
|
||||
} else if (currentPos>-1 && taskIndex>-1 && separators[currentPos].index !== taskIndex) {
|
||||
//update that separator
|
||||
//console.log("update separator:"+launcher+" from:"+separators[currentPos].index+" -> "+taskIndex);
|
||||
|
||||
separators[currentPos].index = taskIndex;
|
||||
updated = true;
|
||||
}
|
||||
|
@ -301,7 +301,13 @@ MouseArea{
|
||||
Connections{
|
||||
target: root
|
||||
onEditModeChanged: separatorItem.updateForceHiddenState();
|
||||
onDragSourceChanged: separatorItem.updateForceHiddenState();
|
||||
onDragSourceChanged: {
|
||||
separatorItem.updateForceHiddenState();
|
||||
|
||||
if (isSeparator && !root.dragSource) {
|
||||
parabolicManager.setSeparator(launcherUrl, itemIndex);
|
||||
}
|
||||
}
|
||||
onSeparatorsUpdated: separatorItem.updateForceHiddenState();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user