Skip to content

Commit 7e61616

Browse files
committed
[geometry-checker-gui] add scroll area and save geometry dialog to settings
1 parent 2fa916d commit 7e61616

5 files changed

Lines changed: 916 additions & 1015 deletions

File tree

‎src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.cpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <QCloseEvent>
2222
#include <QVBoxLayout>
23+
#include <QSettings>
2324

2425
QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidget *parent )
2526
: QDialog( parent )
@@ -28,6 +29,9 @@ QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidge
2829

2930
setWindowTitle( tr( "Check Geometries" ) );
3031

32+
QSettings s;
33+
restoreGeometry( s.value( "/Plugin-GeometryChecker/Window/geometry" ).toByteArray() );
34+
3135
mTabWidget = new QTabWidget();
3236
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal );
3337

@@ -44,6 +48,12 @@ QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidge
4448
connect( mTabWidget->widget( 0 ), SIGNAL( checkerFinished( bool ) ), this, SLOT( onCheckerFinished( bool ) ) );
4549
}
4650

51+
QgsGeometryCheckerDialog::~QgsGeometryCheckerDialog()
52+
{
53+
QSettings s;
54+
s.setValue( "/Plugin-GeometryChecker/Window/geometry", saveGeometry() );
55+
}
56+
4757
void QgsGeometryCheckerDialog::onCheckerStarted( QgsGeometryChecker *checker, QgsFeaturePool *featurePool )
4858
{
4959
delete mTabWidget->widget( 1 );

‎src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class QgsGeometryCheckerDialog : public QDialog
3131
Q_OBJECT
3232
public:
3333
QgsGeometryCheckerDialog( QgisInterface* iface, QWidget* parent = 0 );
34+
~QgsGeometryCheckerDialog();
3435

3536
private:
3637
QgisInterface* mIface;

‎src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ void QgsGeometryCheckerResultTab::setDefaultResolutionMethods()
537537
QVBoxLayout* layout = new QVBoxLayout( &dialog );
538538

539539
QScrollArea* scrollArea = new QScrollArea( &dialog );
540+
scrollArea->setFrameShape( QFrame::NoFrame );
541+
layout->setContentsMargins( 0, 0, 0, 0 );
540542
layout->addWidget( scrollArea );
541543

542544
QWidget* scrollAreaContents = new QWidget( scrollArea );

0 commit comments

Comments
 (0)