Verified Commit 762a36fc authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

Make it impossible to open the progress view sheet multiple times

Summary:
It used to be possible after resizing the window so narrowly that the drawer switched into modal mode and back to its original width.
There is still the question of why the sheet is sometimes left behind the drawer, but that's probably something for another patch.

Test Plan: Multiple ProgressView sheets can't be opened at the same time anymore

Reviewers: #discover_software_store, apol

Reviewed By: #discover_software_store, apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25109
parent bc2c0d4e
...@@ -23,10 +23,13 @@ Kirigami.AbstractListItem { ...@@ -23,10 +23,13 @@ Kirigami.AbstractListItem {
} }
visible: TransactionModel.count > 0 visible: TransactionModel.count > 0
property QtObject sheetObject: null property Kirigami.OverlaySheet sheetObject: null
onClicked: { onClicked: {
sheetObject = sheet.createObject() if (!sheetObject)
sheetObject.open() sheetObject = sheet.createObject()
if (!sheetObject.sheetOpen)
sheetObject.open()
} }
onVisibleChanged: if (!visible && sheetObject) { onVisibleChanged: if (!visible && sheetObject) {
sheetObject.close() sheetObject.close()
......
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