Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Save/restore window geometry for change label properties dialog
  • Loading branch information
dakcarto committed Jun 16, 2013
1 parent 9e2c4a0 commit 4b8f3c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgslabelpropertydialog.cpp
Expand Up @@ -25,6 +25,8 @@

#include <QColorDialog>
#include <QFontDatabase>
#include <QSettings>


QgsLabelPropertyDialog::QgsLabelPropertyDialog( const QString& layerId, int featureId, const QFont& labelFont, const QString& labelText, QgsMapRenderer* renderer, QWidget * parent, Qt::WindowFlags f ):
QDialog( parent, f ), mMapRenderer( renderer ), mLabelFont( labelFont ), mCurLabelField( -1 )
Expand All @@ -33,10 +35,15 @@ QgsLabelPropertyDialog::QgsLabelPropertyDialog( const QString& layerId, int feat
fillHaliComboBox();
fillValiComboBox();
init( layerId, featureId, labelText );

QSettings settings;
restoreGeometry( settings.value( QString( "/Windows/ChangeLabelProps/geometry" ) ).toByteArray() );
}

QgsLabelPropertyDialog::~QgsLabelPropertyDialog()
{
QSettings settings;
settings.setValue( QString( "/Windows/ChangeLabelProps/geometry" ), saveGeometry() );
}

void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const QString& labelText )
Expand Down

0 comments on commit 4b8f3c7

Please sign in to comment.