Skip to content

Commit

Permalink
save and restore position of merge attribute dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 31, 2012
1 parent 80ae87b commit 42c24da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -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" ) );
Expand Down
14 changes: 13 additions & 1 deletion src/app/qgsmergeattributesdialog.cpp
Expand Up @@ -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 )
Expand All @@ -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;
}

Expand Down

0 comments on commit 42c24da

Please sign in to comment.