-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wxGUI/lmgr: fix saving web service layer as raster map #3101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <kratochanna@gmail.com>
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
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):