Skip to content
Permalink
Browse files

save and restore position of merge attribute dialog

  • Loading branch information
jef-n committed Jan 31, 2012
1 parent 80ae87b commit 42c24dac90c933b8eabfa0b044c9fc5fe883df48
Showing with 17 additions and 3 deletions.
  1. +4 −2 src/app/qgsmaptooladdfeature.cpp
  2. +13 −1 src/app/qgsmergeattributesdialog.cpp
@@ -249,14 +249,16 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
{
//not a polygon type. Impossible to get there
}
/*else if ( avoidIntersectionsReturn == 2 ) //MH120131: disable this error message until there is a better way to cope with the single type / multi type problem
#if 0
else if ( avoidIntersectionsReturn == 2 ) //MH120131: disable this error message until there is a better way to cope with the single type / multi type problem
{
//bail out...
QMessageBox::critical( 0, tr( "Error" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type" ) );
delete f;
stopCapturing();
return;
}*/
}
#endif
else if ( avoidIntersectionsReturn == 3 )
{
QMessageBox::critical( 0, tr( "Error" ), tr( "An error was reported during intersection removal" ) );
@@ -23,8 +23,10 @@
#include "qgsrubberband.h"
#include "qgsvectorlayer.h"
#include "qgsattributeeditor.h"

#include <limits>
#include <QComboBox>
#include <QSettings>

QgsMergeAttributesDialog::QgsMergeAttributesDialog( const QgsFeatureList &features, QgsVectorLayer *vl, QgsMapCanvas *canvas, QWidget *parent, Qt::WindowFlags f )
: QDialog( parent, f )
@@ -46,15 +48,25 @@ QgsMergeAttributesDialog::QgsMergeAttributesDialog( const QgsFeatureList &featur

mFromSelectedPushButton->setIcon( QgisApp::getThemeIcon( "mActionFromSelectedFeature.png" ) );
mRemoveFeatureFromSelectionButton->setIcon( QgisApp::getThemeIcon( "mActionRemoveSelectedFeature.png" ) );

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

QgsMergeAttributesDialog::QgsMergeAttributesDialog(): QDialog()
QgsMergeAttributesDialog::QgsMergeAttributesDialog()
: QDialog()
{
setupUi( this );

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

QgsMergeAttributesDialog::~QgsMergeAttributesDialog()
{
QSettings settings;
settings.setValue( "/Windows/MergeAttributes/geometry", saveGeometry() );

delete mSelectionRubberBand;
}

0 comments on commit 42c24da

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