This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Layer/Feature Visibility Crash

Tags: marble, layer, crash, visibility marble, layer, crash, visibility marble, layer, crash, visibility
(comma "," separated)
rabi
Registered Member
Posts
5
Karma
0

Layer/Feature Visibility Crash

Fri Sep 25, 2020 4:29 pm
I have observed odd behavior when toggling the visibility of a GeoDataGroundOverlay on a GeoDataDocument.
Namely, toggling the visilbity of the feature on the first document added affects the visiblity of the feature on the last document added.
    - What is the proper method of toggling feature visibility?
    - Does using updateFeature change the "order" of KML element in the tree model?

The method I am using to add features:
Code: Select all
if (tree_model)
{
            Marble::GeoDataLatLonBox box(ymax, ymin, xmax, xmin, Marble::GeoDataCoordinates::Degree);
            box.setRotation(0, Marble::GeoDataCoordinates::Degree);
           
            box_overlay = new Marble::GeoDataGroundOverlay();
            box_overlay->setLatLonBox(box);
            box_overlay->setIcon(image);
           
            layer_document = new Marble::GeoDataDocument();
            tree_model->addDocument(layer_document);
            tree_model->addFeature(layer_document, box_overlay);
}


The method I am using to toggle visibility:
Code: Select all
void MapWrapper::set_visibility(bool visibility)
{
   if (tree_model && box_overlay)
   {
      box_overlay->setVisible(visibility);
      tree_model->updateFeature(box_overlay);
   }
}


Where tree_model is a const reference to the Marble widget's treeModel, layer_document and box_overlay are class variables and image is a generated QImage.
I have only noticed this issue when using overlays so far, regardless of whether I use updateFeature or add/remove the entire document.
rabi
Registered Member
Posts
5
Karma
0

Re: Layer/Feature Visibility Crash

Tue Sep 29, 2020 1:48 pm
For reference:

Windows 10 64bit
VS 2015 v140; Target Platform 10.0.10586.0
Qt 5.8.0
Marble 19.08 -- and just verified the same issue exists in the latest release, 20.08

A while back someone replied they were having the same issue.
Any thoughts?
I will probably submit an issue to the source code repository.
rabi
Registered Member
Posts
5
Karma
0


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]