Skip to content

Commit 11b23d5

Browse files
committed
fix tile scale widget state tracking
1 parent a5db99a commit 11b23d5

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "1")
22
SET(CPACK_PACKAGE_VERSION_MINOR "9")
33
SET(CPACK_PACKAGE_VERSION_PATCH "0")
44
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
5-
SET(RELEASE_NAME "Lisboa")
5+
SET(RELEASE_NAME "Master")
66
SET(PROJECT_VERSION ${COMPLETE_VERSION})
77
PROJECT(qgis${PROJECT_VERSION})
88
IF (APPLE)

src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static void setTitleBarText_( QWidget & qgisApp )
286286
{
287287
QString caption = QgisApp::tr( "Quantum GIS " );
288288

289-
if ( QString( QGis::QGIS_VERSION ).endsWith( "Alpha" ) )
289+
if ( QString( QGis::QGIS_VERSION ).endsWith( "Master" ) )
290290
{
291291
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
292292
}

src/providers/wms/qgstilescalewidget.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ QgsTileScaleWidget::QgsTileScaleWidget( QgsMapCanvas * mapCanvas, QWidget * pare
3939

4040
QgsTileScaleWidget::~QgsTileScaleWidget()
4141
{
42-
QSettings settings;
43-
settings.setValue( "/UI/tileScaleEnabled", isVisible() );
4442
}
4543

4644
void QgsTileScaleWidget::layerChanged( QgsMapLayer *layer )
@@ -158,8 +156,16 @@ void QgsTileScaleWidget::showTileScale( QMainWindow *mainWindow )
158156
QgsDebugMsg( "panel menu not found" );
159157
}
160158

161-
panelMenu->addAction( dock->toggleViewAction() );
162-
163159
dock->setWidget( tws );
164-
dock->show();
160+
161+
connect( dock->toggleViewAction(), SIGNAL( triggered( bool ) ), tws, SLOT( scaleEnabled( bool ) ) );
162+
163+
QSettings settings;
164+
dock->setVisible( settings.value( "/UI/tileScaleEnabled", false ).toBool() );
165+
}
166+
167+
void QgsTileScaleWidget::scaleEnabled( bool enabled )
168+
{
169+
QSettings settings;
170+
settings.setValue( "/UI/tileScaleEnabled", enabled );
165171
}

src/providers/wms/qgstilescalewidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class QgsTileScaleWidget : public QWidget, private Ui::QgsTileScaleWidget
3535
void layerChanged( QgsMapLayer *layer );
3636
void scaleChanged( double );
3737
void on_mSlider_valueChanged( int );
38+
void scaleEnabled( bool );
3839

3940
private:
4041
QgsTileScaleWidget( QgsMapCanvas *mapCanvas, QWidget *parent = 0, Qt::WindowFlags f = 0 );

0 commit comments

Comments
 (0)