Skip to content

wxGUI: Projection checkbox from Map Display statusbar moved to Map Display Settings #2087

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

Conversation

lindakarlovska
Copy link
Contributor

@lindakarlovska lindakarlovska commented Jan 12, 2022

This PR creates a new Statusbar page in Map Display settings and move there "Use defined projection checkbox".
Výstřižek

@lindakarlovska lindakarlovska changed the title checkbox moved to map disp settings wxGUI: Projection checkbox from Map Display statusbar moved to Map Display Settings Jan 12, 2022
else:
self.widget.SetLabel(self.defaultLabel)

# disable long help
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to deal with this method. Seems like quite dependent on mapframe. I have noticed that it is quite common in statusbar.py (SbItem, SbMapScale, SbGoTo and SbProjection), however we need to get rid of map display dependency. So maybe put it into giface?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it even doing? Doesn't look very important.

Copy link
Contributor Author

@lindakarlovska lindakarlovska Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me the same. As far as I was able to find out it sets the help to a toolbar item. E.g. if enabled it sets a tool long help something like: WindowIDRef: -31309 Zoom to default or saved region, save to named region, .... If not enabled the help is just WindowIDRef: -31309.

@neteler neteler added this to the 8.2.0 milestone Jan 13, 2022
@lindakarlovska lindakarlovska added GUI wxGUI related enhancement New feature or request labels Jan 13, 2022
@@ -95,6 +95,23 @@ def alignExtent(self, value):
self.alignExtentChanged.emit(value=value)


class StatusBarProperties(object):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this could be part of MapWindowProperties, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well.. I had the feeling that it should be separated because status bar properties do not influence a map window itself in any way. But it is probably early to decide, we can divide it later on if needed.

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume moving the projection selection from GUI settings would go into another PR?

:return: widget or None if doesn't exist
"""
return self.widget

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this class is missing all the property functions and does not inherit from PropertyItem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit unsure about _connect and _disconnect methods. They are not used for projection class but they may be called (if we let projection inherit from PropertyItem). Not sure if it is not confusing. For me not, but not sure if it is the way how it should be correctly implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I can share the solution with the inheritance I made...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why it should behave/be implemented differently, so I changed that based on the other properties, but please test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it can be implemented in the same way. I was probably confused by signals. I tested the changes you made and it works fine.

@lindakarlovska
Copy link
Contributor Author

I assume moving the projection selection from GUI settings would go into another PR?

Yes, that's a plan.

@petrasovaa petrasovaa merged commit 02b305a into OSGeo:main Jan 31, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants