Summary: | Marble can't show several DataLayers in QML applidation | ||
---|---|---|---|
Product: | [Applications] marble | Reporter: | Oleg Lyubimov <lyubimov.o.e> |
Component: | general | Assignee: | Dennis Nienhüser <nienhueser> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nienhueser |
Priority: | NOR | ||
Version: | 1.4 (KDE 4.9) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/marble/b7d4c01c6ea639a173974fc16beb7dc7600c09f6 | Version Fixed In: | KDE-4.10.3/Marble-1.5.3 |
Sentry Crash Report: |
Description
Oleg Lyubimov
2013-04-02 09:53:29 UTC
Good catch, thanks for reporting and tracking it down. The cause is the wrong use of the shared (static) m_counter variable for nameId() in case it has not been assigned a unique string id (i.e. in .qml you're not setting some unique nameId like "myFirstLayer" for each DataLayer). Instead it must use its own (not shared) counter which is only synced with the global counter in the ctor. I'll commit a fix shortly and backport it to 1.5 as well. If you can't / don't want to wait for the fix, you can also specify the nameId property in each DataLayer in QML as a workaround. I checked that this workaround works as well with your example above. E.g. DataLayer{ id: la1 nameId: "layer1" ... DataLayer{ id: la2 nameId: "layer2" ... Git commit 801e4c7dab0ec0d832c1bb4c3311236583f65f25 by Dennis Nienhüser. Committed on 03/04/2013 at 22:39. Pushed by nienhueser into branch 'master'. Use shared counter only for initialization. Fixes equality comparison for anonymous QML data layers (where nameId is unspecified) needed to have more than one QML data layer displayed at once. M +5 -4 src/plugins/declarative/DeclarativeDataPlugin.cpp http://commits.kde.org/marble/801e4c7dab0ec0d832c1bb4c3311236583f65f25 Git commit b7d4c01c6ea639a173974fc16beb7dc7600c09f6 by Dennis Nienhüser. Committed on 03/04/2013 at 22:39. Pushed by nienhueser into branch 'KDE/4.10'. Use shared counter only for initialization. Fixes equality comparison for anonymous QML data layers (where nameId is unspecified) needed to have more than one QML data layer displayed at once. FIXED-IN: KDE-4.10.3/Marble-1.5.3 (cherry picked from commit 801e4c7dab0ec0d832c1bb4c3311236583f65f25) M +5 -4 src/plugins/declarative/DeclarativeDataPlugin.cpp http://commits.kde.org/marble/b7d4c01c6ea639a173974fc16beb7dc7600c09f6 |