[Marble-commits] KDE/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Sat Sep 11 22:47:34 CEST 2010
SVN commit 1174294 by nienhueser:
Add a toggle method for the Routing tab. Fix a crash happening when toggling the current location tab and no map theme is set.
M +6 -2 MarbleControlBox.cpp
M +6 -0 MarbleControlBox.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleControlBox.cpp #1174293:1174294
@@ -433,7 +433,7 @@
{
QString title = tr( "Current Location" );
setWidgetTabShown( d->m_currentLocationWidget, 4, show, title );
- if ( d->m_widget ) {
+ if ( d->m_widget && d->m_widget->mapTheme() ) {
bool enabled = d->m_widget->mapTheme()->head()->target() == "earth";
int locationIndex = indexOf( d->m_currentLocationWidget );
if ( locationIndex >= 0 ) {
@@ -446,8 +446,12 @@
}
}
+void MarbleControlBox::setRoutingTabShown( bool show )
+{
+ QString title = tr( "Routing" );
+ setWidgetTabShown( d->m_routingWidget, 5, show, title );
+}
-
void MarbleControlBox::resizeEvent ( QResizeEvent * )
{
if ( height() < 500 ) {
--- trunk/KDE/kdeedu/marble/src/lib/MarbleControlBox.h #1174293:1174294
@@ -215,6 +215,12 @@
*/
void setFileViewTabShown( bool show );
+ /**
+ * @brief Control whether the Routing tab is shown.
+ * @param show boolean that controls if the Routing tab is shown.
+ */
+ void setRoutingTabShown( bool show );
+
/// whenever a new map gets inserted, the following slot will adapt the ListView accordingly
void updateMapThemeView();
More information about the Marble-commits
mailing list