make sure to cancel edit when the user moves

This commit is contained in:
Marco Martin 2020-02-07 13:48:34 +01:00
parent 6adbe5249d
commit 477d6c1c79
2 changed files with 10 additions and 1 deletions

View file

@ -50,6 +50,10 @@ ContainmentLayoutManager.ItemContainer {
signal launch(int x, int y, var source, string title)
Connections {
target: mainFlickable
onCancelEditModeForItemsRequested: cancelEdit()
}
onDragActiveChanged: {
launcherDragManager.active = dragActive
if (dragActive) {

View file

@ -70,7 +70,6 @@ Item {
}
//END functions
property bool componentComplete: false
onWidthChanged: recalculateMaxFavoriteCount()
onHeightChanged:recalculateMaxFavoriteCount()
@ -151,6 +150,12 @@ Item {
contentHeight: flickableContents.height
interactive: !plasmoid.editMode && !launcherDragManager.active
signal cancelEditModeForItemsRequested
onDragStarted: cancelEditModeForItemsRequested()
onDragEnded: cancelEditModeForItemsRequested()
onFlickStarted: cancelEditModeForItemsRequested()
onFlickEnded: cancelEditModeForItemsRequested()
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
id: scrollabr
opacity: mainFlickable.moving