Currently the MapInfoDialog is shown via a setVisible( true ) call. It pops up at the current geo position in screen coordinates, which is fine. It should also be possible however to have the dialog open after it recenters the map such that its content becomes ideally visible. The geo position associated with the map dialog should move somewhere near the window center then (shifted a bit left/right/above/below depending on the alignment). A possible implementation could go like that: - add a method setMarbleWidget( MarbleWidget* widget ) to MapInfoDialog. Have it store the passed pointer in a new member variable - Change MarbleWidget.cpp to call that method where it sets up m_mapInfoDialog - add a method popup() to MapInfoDialog - Inside, store a bool m_adjustMap=true and call setVisible( true ) - Adjust render() to check for m_adjustMap. If set, recenter (using MarbleWidget*) appropriately. Bonus points for shifting it a bit from the center based on the alignment
Git commit 964e92f93e579420a8d7bbbed43941657741d50d by Dennis Nienhüser, on behalf of Andrei Duma. Committed on 10/04/2013 at 09:08. Pushed by nienhueser into branch 'master'. Add a popup() method to MapInfoDialog REVIEW: 109921 M +18 -1 src/lib/MapInfoDialog.cpp M +19 -0 src/lib/MapInfoDialog.h M +1 -0 src/lib/MarbleWidget.cpp M +1 -1 src/lib/MarbleWidgetPopupMenu.cpp http://commits.kde.org/marble/964e92f93e579420a8d7bbbed43941657741d50d