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

Problem to paint a custom layer in Marble

Tags: None
(comma "," separated)
antoinem
Registered Member
Posts
1
Karma
0
Hello,
I try to paint a custom layer using the LayerInterface like here: https://techbase.kde.org/Marble/LayerInterface. I added a menu action that is supposed to paint a square on the map, the problem is that it doesn't always do so: the first time I click, it shows nothing on the map (but a 'MyPaintLayer' object is created and the 'render' method is called), the second time I click, I can see a ne square on the map, the third time, the square is gone and after that, the behaviour is quite strange. The funny thing is that when I comment the following lines:
Code: Select all
map_widget->setShowCompass(false);
map_widget->setShowCrosshairs(false);
map_widget->setShowGrid(false);
map_widget->setShowScaleBar(false);
map_widget->setShowOverviewMap(false);


on mainwindow.cpp, the square is created at the first click but the behaviour is still strange (since the square color has some opacity, adding a new square should be visible, but it's not at first, then it becomes visible after about 10 new layouts).

I have created a gist with a minimal project that has the problem: https://gist.github.com/anonymous/d3a559bd309d7f17bc3030955083dba6.
I really don't understand what's going on.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell