-
-
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: refactoring: build GUI tools' status bars based on wx.StatusBar widget #1689
wxGUI: refactoring: build GUI tools' status bars based on wx.StatusBar widget #1689
Conversation
@petrasovaa I have moved some methods to MapFrameBase, so we can expect a small conflict with #1704. After merging #1704, I am gonna look at this PR again and test it. |
|
I think it makes sense to assume all derived classes have statusbar, so I think creating status bar could be moved. Initializing it with items sounds more like individual derived classes should do I think. |
3d84d76
to
23c5659
Compare
@@ -267,72 +253,76 @@ def OnAutoRenderChanged(self, value): | |||
style ^= wx.SP_LIVE_UPDATE | |||
self.splitter.SetWindowStyle(style) | |||
|
|||
def AddToolbars(self): | |||
def AddToolbar(self, name): |
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.
Not sure why not keep AddToolbars as it was. The ifs there don't make much sense, also passing the toolbar names in constructor is not particularly useful unless you create different mapswipe tools with different toolbars.
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.
Well, I just wanted to unify names and functionality since I call AddToolbar in ShowAllToolbars method in the base class.
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.
It is true that we do not need ShowAllToolbars method for Map Swipe but everything which in the base class could be generally usable in all childs. So, if we let AddToolbars the ShowAllToolbars method will need to override.
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.
Ok, that makes sense, so feel free to put it back. Perhaps the names of toolbars don't need to be in the constructor since they are fixed anyway,
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.
Also for that case when AddToolbar would be used more times (while adding/removing), then you need to adjust the code to not create a new toolbar every time.
The same probably needs to be done for image2target/ii2t_mapdisplay.py, photo2image/ip2i_mapdisplay.py. |
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.
I think this looks good. I still want to test it little bit more though. Not sure about merging it now, it shouldn't go into release.
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.
Please check the order of toolbars. I just tested mapswipe and the order is different than it used to be.
Should be okay now. |
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
…r widget (OSGeo#1689) Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame. Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
This PR builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.