Skip to content
Permalink
Browse files

Fix algorithm dialog window geometry save/restore

  • Loading branch information
nyalldawson committed Dec 21, 2017
1 parent ce28cf5 commit 54910fc3ce52af62a9390db3affca1a8af4ab7ea
@@ -99,8 +99,6 @@ Returns the parameter values for the algorithm to run in the dialog.

virtual void accept();

virtual void reject();


void reportError( const QString &error );
%Docstring
@@ -139,9 +137,6 @@ Pushes a console info string to the dialog's log.

protected:

virtual void closeEvent( QCloseEvent *e );


QPushButton *runButton();
%Docstring
Returns the dialog's run button.
@@ -17,6 +17,7 @@
#include "qgssettings.h"
#include "qgshelp.h"
#include "qgsmessagebar.h"
#include "qgsgui.h"
#include "processing/qgsprocessingalgorithm.h"
#include "processing/qgsprocessingprovider.h"
#include <QToolButton>
@@ -83,8 +84,9 @@ QgsProcessingAlgorithmDialogBase::QgsProcessingAlgorithmDialogBase( QWidget *par
handleLayout->addStretch();
splitterHandle->setLayout( handleLayout );

QgsGui::instance()->enableAutoGeometryRestore( this );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "/Processing/dialogBase" ) ).toByteArray() );
splitter->restoreState( settings.value( QStringLiteral( "/Processing/dialogBaseSplitter" ), QByteArray() ).toByteArray() );
mSplitterState = splitter->saveState();
splitterChanged( 0, 0 );
@@ -184,12 +186,6 @@ void QgsProcessingAlgorithmDialogBase::showLog()
mTabWidget->setCurrentIndex( 1 );
}

void QgsProcessingAlgorithmDialogBase::closeEvent( QCloseEvent *e )
{
saveWindowGeometry();
QDialog::closeEvent( e );
}

QPushButton *QgsProcessingAlgorithmDialogBase::runButton()
{
return mButtonRun;
@@ -224,12 +220,6 @@ void QgsProcessingAlgorithmDialogBase::accept()
{
}

void QgsProcessingAlgorithmDialogBase::reject()
{
saveWindowGeometry();
QDialog::reject();
}

void QgsProcessingAlgorithmDialogBase::openHelp()
{
QUrl algHelp = mAlgorithm->helpUrl();
@@ -335,11 +325,6 @@ QString QgsProcessingAlgorithmDialogBase::formatHelp( QgsProcessingAlgorithm *al
return QString();
}

void QgsProcessingAlgorithmDialogBase::saveWindowGeometry()
{

}

void QgsProcessingAlgorithmDialogBase::resetGui()
{
lblProgress->clear();
@@ -144,7 +144,6 @@ class GUI_EXPORT QgsProcessingAlgorithmDialogBase : public QDialog, private Ui::
public slots:

void accept() override;
void reject() override;

/**
* Reports an \a error string to the dialog's log.
@@ -183,8 +182,6 @@ class GUI_EXPORT QgsProcessingAlgorithmDialogBase : public QDialog, private Ui::

protected:

void closeEvent( QCloseEvent *e ) override;

/**
* Returns the dialog's run button.
*/
@@ -274,7 +271,6 @@ class GUI_EXPORT QgsProcessingAlgorithmDialogBase : public QDialog, private Ui::
bool mHelpCollapsed = false;

QString formatHelp( QgsProcessingAlgorithm *algorithm );
void saveWindowGeometry();

};

0 comments on commit 54910fc

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