Bug 376626 - View does not recenter after loading of file
Summary: View does not recenter after loading of file
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 2.1 (KDE Applications 16.12)
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-18 16:49 UTC by Werner Stille
Modified: 2023-04-08 06:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for automatic recentering after loading files (643 bytes, patch)
2017-02-18 16:49 UTC, Werner Stille
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Werner Stille 2017-02-18 16:49:42 UTC
Created attachment 104101 [details]
Patch for automatic recentering after loading files

When using MarbleWidget::model()->addGeoDataFile() to load a file, the view
is not recentered any more according to the content, in contrast to the
previous Marble version (2.0).

It seems that after inserting the new parameter "renderOrder" in
FileManager::addFile(), the call of that function in
MarbleModel::addGeoDataFile() was not updated correctly to pass the
value "true" for the parameter "recenter".

The attached patch seems to cure the problem.
Comment 1 Justin Zobel 2022-10-31 04:31:58 UTC
Thank you for reporting this bug 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 2 Werner Stille 2022-10-31 17:22:55 UTC
Thank you for noticing my bug report. The issue can be reproduced with the current version 22.08.2 of marble, and again can be cured by the suggested patch, i. e. by changing the call FileManager::addFile() in MarbleWidget::model()->addGeoDataFile() (in MarbleModel.cpp) to:

d->m_fileManager.addFile( filename, filename, GeoDataStyle::Ptr(), UserDocument, 0, true );
Comment 3 Torsten Rahn 2023-04-08 06:33:06 UTC
Fixed with

commit fbb2d704c615a1cd4968bed49a0d4b26c1469134
Author: Anthony P. Austin <aaustin@meromorphic.net>
Date:   Sun Jul 24 10:46:22 2022 -0700

    Restore former GPX rendering behavior.
    
    Previous versions of Marble rendered GPX tracks using a thick red line
    and then recentered and zoomed the map so that the newly-loaded track
    occupied most of the display.  At some point, this behavior got lost;
    for some time now, Marble has been rendering GPX tracks as a
    difficult-to-see 1-pixel-wide white line and not recentering or zooming
    the map, leading some users to the conclusion that the software wasn't
    loading the track at all.  See the following bug reports:
    
      https://bugs.kde.org/show_bug.cgi?id=419998
      https://bugs.kde.org/show_bug.cgi?id=411669
      https://bugs.kde.org/show_bug.cgi?id=370263
      https://bugs.kde.org/show_bug.cgi?id=402153
    
    This patch restores the old rendering behavior.