Bug 318393 - Marble can not save center position and zoom in QML application
Summary: Marble can not save center position and zoom in QML application
Status: RESOLVED WORKSFORME
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.4 (KDE 4.9)
Platform: Meego/Harmattan Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-15 14:43 UTC by Oleg Lyubimov
Modified: 2023-02-01 05:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Lyubimov 2013-04-15 14:43:20 UTC
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
Comment 1 Andrew Crouthamel 2018-11-10 03:17:59 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-20 04:07:34 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Justin Zobel 2023-01-02 02:04:30 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2023-01-17 05:15:39 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2023-02-01 05:05:07 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!