mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
use the global showPassiveNotification function
don't create a local PassiveNotification copy, use the global show/hidePassiveNotification from ApplicationWindow, now that it works Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
93f9bcd041
commit
d24e5b455f
3 changed files with 4 additions and 18 deletions
|
@ -25,7 +25,6 @@ MobileComponents.Page {
|
|||
property alias startpressure: detailsEdit.startpressureText
|
||||
property alias endpressure: detailsEdit.endpressureText
|
||||
property alias gasmix: detailsEdit.gasmixText
|
||||
property QtObject notificationComponent
|
||||
|
||||
state: "view"
|
||||
|
||||
|
@ -65,8 +64,7 @@ MobileComponents.Page {
|
|||
onTriggered: {
|
||||
var deletedId = diveDetailsListView.currentItem.modelData.dive.id
|
||||
manager.deleteDive(deletedId)
|
||||
var notification = notificationComponent.createObject(contentItem.parent);
|
||||
notification.showNotification("Dive deleted", 3000, "Undo",
|
||||
showPassiveNotification("Dive deleted", 3000, "Undo",
|
||||
function() {
|
||||
manager.undoDelete(deletedId)
|
||||
});
|
||||
|
@ -194,12 +192,4 @@ MobileComponents.Page {
|
|||
id: detailsEdit
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
notificationComponent = Qt.createComponent("PassiveNotification.qml");
|
||||
if( notificationComponent.status != Component.Ready ) {
|
||||
print("notificationComponent isn't ready with status " + notificationComponent.status)
|
||||
if( notificationComponent.status == Component.Error )
|
||||
print("Error:"+ notificationComponent.errorString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue