Commit 12c5c46a authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Fix moving streams by drag and drop

This broke when I moved the contents into compactRepresentation as the main could no longer access those items by ID.

BUG: 389402
FIXED-IN: 5.12.0

Differential Revision: https://phabricator.kde.org/D10093
parent 7e69cf59
......@@ -77,12 +77,12 @@ PlasmaComponents.ListItem {
onDragStarted: {
draggedStream = PulseObject;
main.beginMoveStream(type == "sink-input" ? "sink" : "source");
beginMoveStream(type == "sink-input" ? "sink" : "source");
}
onDrop: {
draggedStream = null;
main.endMoveStream();
endMoveStream();
}
MouseArea {
......
......@@ -137,27 +137,6 @@ Item {
osd.showMicrophone(toMute? 0 : volumePercent(sourceModel.defaultSource.volume));
}
function beginMoveStream(type, stream) {
if (type == "sink") {
sourceView.visible = false;
sourceViewHeader.visible = false;
} else if (type == "source") {
sinkView.visible = false;
sinkViewHeader.visible = false;
}
tabBar.currentTab = devicesTab;
}
function endMoveStream() {
tabBar.currentTab = streamsTab;
sourceView.visible = true;
sourceViewHeader.visible = true;
sinkView.visible = true;
sinkViewHeader.visible = true;
}
function playFeedback(sinkIndex) {
if (!volumeFeedback) {
return;
......@@ -276,6 +255,27 @@ Item {
Plasmoid.fullRepresentation: ColumnLayout {
spacing: units.smallSpacing
function beginMoveStream(type, stream) {
if (type == "sink") {
sourceView.visible = false;
sourceViewHeader.visible = false;
} else if (type == "source") {
sinkView.visible = false;
sinkViewHeader.visible = false;
}
tabBar.currentTab = devicesTab;
}
function endMoveStream() {
tabBar.currentTab = streamsTab;
sourceView.visible = true;
sourceViewHeader.visible = true;
sinkView.visible = true;
sinkViewHeader.visible = true;
}
RowLayout {
spacing: units.smallSpacing
Layout.fillWidth: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment