wxGUI/lmgr: fix saving web service layer as raster map#3101
wxGUI/lmgr: fix saving web service layer as raster map#3101tmszi merged 2 commits intoOSGeo:mainfrom
Conversation
wenzeslaus
left a comment
There was a problem hiding this comment.
This looks wrong. It is accessing a private attribute of self.mapdisplay. The "GRASS interface" references are meant to be shared to objects you create when appropriate, but not the other way around. self._giface like on line 871 would be how the code usually looks like.
Yes I know about it. Original arg Should I initialize a new |
|
This is probably a more correct solution, but I did just brief testing. |
wenzeslaus
left a comment
There was a problem hiding this comment.
The callback is actually a factory method so in a sense it is similar to constructor. In the context of giface concept, constructors should generally get the right giface rather than try to create it themselves. This moves creation of giface out of the callback and adds giface as its parameter, so it looks like the right solution. It also removes the duplicate code between the two callbacks which is nice and usually a good sign.
Co-authored-by: Anna Petrasova <[email protected]>
Co-authored-by: Anna Petrasova <[email protected]>
Co-authored-by: Anna Petrasova <[email protected]>
Co-authored-by: Anna Petrasova <[email protected]>
Describe the bug
Saving web service layer as raster map fail.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Saving web service layer as raster map should work.
System description (please complete the following information):