[Marble-bugs] [marble] [Bug 318393] New: Marble can not save center position and zoom in QML application
Oleg Lyubimov
lyubimov.o.e at gmail.com
Mon Apr 15 14:43:20 UTC 2013
https://bugs.kde.org/show_bug.cgi?id=318393
Bug ID: 318393
Summary: Marble can not save center position and zoom in QML
application
Classification: Unclassified
Product: marble
Version: 1.4.0 (KDE 4.9.0)
Platform: Meego/Harmattan
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: marble-bugs at kde.org
Reporter: lyubimov.o.e at gmail.com
Marble -touch or any other custom application, which uses
MarbleDeclarativeWidget does not save center position and zoom of the map when
you close the application.
Reproducible: Always
Steps to Reproduce:
1. Create standart QML application
2. change text in the main QML to follow:
/////////////////// main.qml //////////////////////////////////
import QtQuick 1.1
import org.kde.edu.marble 0.11
Rectangle {
id: widget
width: 500
height: 700
MarbleWidget {
id: map
anchors.fill: parent
MarbleSettings{
id: settings
}
workOffline: settings.workOffline
mapThemeId: settings.mapTheme
radius: settings.quitRadius
projection: settings.projection
activeFloatItems: [ "compass", "scalebar", "progress" ]
activeRenderPlugins: settings.activeRenderPlugins
Component.onCompleted: {
// Load last center of the map.
center.longitude = settings.quitLongitude
center.latitude = settings.quitLatitude
tracking.lastKnownPosition.longitude = settings.lastKnownLongitude
tracking.lastKnownPosition.latitude = settings.lastKnownLatitude
initialized = true
}
Component.onDestruction: {
settings.quitRadius = radius
settings.quitLongitude = center.longitude
settings.quitLatitude = center.latitude
}
}
}
////////////// END //////////////////////
3. Scroll the map and change zoom
4. Close the application
5. Run the application again
Actual Results:
The Map starts with (0, 0) center position coordinates and with minimum zoom
Expected Results:
The Map starts with center position and zoom, which it has when the application
was closed.
I think, that the reason of this bug in MarbleSettings.qml
In my application the signal "onDestruction" from MarbleSettings.qml is emitted
earlier, than "onDestruction" on MarbleWidget in main.qml
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Marble-bugs
mailing list