Skip to content

Commit

Permalink
fix tile scale widget state tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 14, 2012
1 parent a5db99a commit 11b23d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "9")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(RELEASE_NAME "Lisboa")
SET(RELEASE_NAME "Master")
SET(PROJECT_VERSION ${COMPLETE_VERSION})
PROJECT(qgis${PROJECT_VERSION})
IF (APPLE)
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -286,7 +286,7 @@ static void setTitleBarText_( QWidget & qgisApp )
{
QString caption = QgisApp::tr( "Quantum GIS " );

if ( QString( QGis::QGIS_VERSION ).endsWith( "Alpha" ) )
if ( QString( QGis::QGIS_VERSION ).endsWith( "Master" ) )
{
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
}
Expand Down
16 changes: 11 additions & 5 deletions src/providers/wms/qgstilescalewidget.cpp
Expand Up @@ -39,8 +39,6 @@ QgsTileScaleWidget::QgsTileScaleWidget( QgsMapCanvas * mapCanvas, QWidget * pare

QgsTileScaleWidget::~QgsTileScaleWidget()
{
QSettings settings;
settings.setValue( "/UI/tileScaleEnabled", isVisible() );
}

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

panelMenu->addAction( dock->toggleViewAction() );

dock->setWidget( tws );
dock->show();

connect( dock->toggleViewAction(), SIGNAL( triggered( bool ) ), tws, SLOT( scaleEnabled( bool ) ) );

QSettings settings;
dock->setVisible( settings.value( "/UI/tileScaleEnabled", false ).toBool() );
}

void QgsTileScaleWidget::scaleEnabled( bool enabled )
{
QSettings settings;
settings.setValue( "/UI/tileScaleEnabled", enabled );
}
1 change: 1 addition & 0 deletions src/providers/wms/qgstilescalewidget.h
Expand Up @@ -35,6 +35,7 @@ class QgsTileScaleWidget : public QWidget, private Ui::QgsTileScaleWidget
void layerChanged( QgsMapLayer *layer );
void scaleChanged( double );
void on_mSlider_valueChanged( int );
void scaleEnabled( bool );

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

0 comments on commit 11b23d5

Please sign in to comment.