Skip to content

Commit 42c24da

Browse files
committed
save and restore position of merge attribute dialog
1 parent 80ae87b commit 42c24da

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/app/qgsmaptooladdfeature.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,16 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
249249
{
250250
//not a polygon type. Impossible to get there
251251
}
252-
/*else if ( avoidIntersectionsReturn == 2 ) //MH120131: disable this error message until there is a better way to cope with the single type / multi type problem
252+
#if 0
253+
else if ( avoidIntersectionsReturn == 2 ) //MH120131: disable this error message until there is a better way to cope with the single type / multi type problem
253254
{
254255
//bail out...
255256
QMessageBox::critical( 0, tr( "Error" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type" ) );
256257
delete f;
257258
stopCapturing();
258259
return;
259-
}*/
260+
}
261+
#endif
260262
else if ( avoidIntersectionsReturn == 3 )
261263
{
262264
QMessageBox::critical( 0, tr( "Error" ), tr( "An error was reported during intersection removal" ) );

src/app/qgsmergeattributesdialog.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
#include "qgsrubberband.h"
2424
#include "qgsvectorlayer.h"
2525
#include "qgsattributeeditor.h"
26+
2627
#include <limits>
2728
#include <QComboBox>
29+
#include <QSettings>
2830

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

4749
mFromSelectedPushButton->setIcon( QgisApp::getThemeIcon( "mActionFromSelectedFeature.png" ) );
4850
mRemoveFeatureFromSelectionButton->setIcon( QgisApp::getThemeIcon( "mActionRemoveSelectedFeature.png" ) );
51+
52+
QSettings settings;
53+
restoreGeometry( settings.value( "/Windows/MergeAttributes/geometry" ).toByteArray() );
4954
}
5055

51-
QgsMergeAttributesDialog::QgsMergeAttributesDialog(): QDialog()
56+
QgsMergeAttributesDialog::QgsMergeAttributesDialog()
57+
: QDialog()
5258
{
5359
setupUi( this );
60+
61+
QSettings settings;
62+
restoreGeometry( settings.value( "/Windows/MergeAttributes/geometry" ).toByteArray() );
5463
}
5564

5665
QgsMergeAttributesDialog::~QgsMergeAttributesDialog()
5766
{
67+
QSettings settings;
68+
settings.setValue( "/Windows/MergeAttributes/geometry", saveGeometry() );
69+
5870
delete mSelectionRubberBand;
5971
}
6072

0 commit comments

Comments
 (0)