Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Make projection properties dialog remember size, position and current…
- Loading branch information
Showing
with
34 additions
and
1 deletion.
-
+23
−1
src/app/qgsprojectproperties.cpp
-
+11
−0
src/app/qgsprojectproperties.h
|
@@ -205,10 +205,13 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa |
|
|
mSnappingLayerSettings.insert( *idIter, newEntry ); |
|
|
} |
|
|
} |
|
|
restoreState(); |
|
|
} |
|
|
|
|
|
QgsProjectProperties::~QgsProjectProperties() |
|
|
{} |
|
|
{ |
|
|
saveState(); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
@@ -437,3 +440,22 @@ void QgsProjectProperties::on_cbxProjectionEnabled_stateChanged( int state ) |
|
|
btnGrpMapUnits->setEnabled( state == Qt::Unchecked ); |
|
|
} |
|
|
|
|
|
/*! |
|
|
* Function to save dialog window state |
|
|
*/ |
|
|
void QgsProjectProperties::saveState() |
|
|
{ |
|
|
QSettings settings; |
|
|
settings.setValue( "/Windows/ProjectProperties/geometry", saveGeometry() ); |
|
|
settings.setValue( "/Windows/ProjectProperties/tab", tabWidget->currentIndex() ); |
|
|
} |
|
|
|
|
|
/*! |
|
|
* Function to restore dialog window state |
|
|
*/ |
|
|
void QgsProjectProperties::restoreState() |
|
|
{ |
|
|
QSettings settings; |
|
|
restoreGeometry( settings.value( "/Windows/ProjectProperties/geometry" ).toByteArray() ); |
|
|
tabWidget->setCurrentIndex( settings.value( "/Windows/ProjectProperties/tab" ).toInt() ); |
|
|
} |
|
@@ -113,4 +113,15 @@ class QgsProjectProperties : public QDialog, private Ui::QgsProjectPropertiesBas |
|
|
Key is the layer id, the pair consists of snap to vertex = 0/snap to segment = 1, |
|
|
snapping tolerance*/ |
|
|
QMap<QString, LayerEntry> mSnappingLayerSettings; |
|
|
|
|
|
|
|
|
/*! |
|
|
* Function to save dialog window state |
|
|
*/ |
|
|
void saveState(); |
|
|
|
|
|
/*! |
|
|
* Function to restore dialog window state |
|
|
*/ |
|
|
void restoreState(); |
|
|
}; |