Skip to content
Permalink
Browse files

fix tile scale widget state tracking

  • Loading branch information
jef-n committed Jun 14, 2012
1 parent a5db99a commit 11b23d5c0e0b0e4a998596027de2b95631cf022a
Showing with 14 additions and 7 deletions.
  1. +1 −1 CMakeLists.txt
  2. +1 −1 src/app/qgisapp.cpp
  3. +11 −5 src/providers/wms/qgstilescalewidget.cpp
  4. +1 −0 src/providers/wms/qgstilescalewidget.h
@@ -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)
@@ -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 );
}
@@ -39,8 +39,6 @@ QgsTileScaleWidget::QgsTileScaleWidget( QgsMapCanvas * mapCanvas, QWidget * pare

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

void QgsTileScaleWidget::layerChanged( QgsMapLayer *layer )
@@ -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 );
}
@@ -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 );

0 comments on commit 11b23d5

Please sign in to comment.
You can’t perform that action at this time.