mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
apply enableAutoGeometryRestore to feature form dialog
This commit is contained in:
parent
d653fb5a8f
commit
5b9be7a966
@ -32,18 +32,6 @@ Create an attribute dialog for a given layer and feature
|
||||
|
||||
~QgsAttributeDialog();
|
||||
|
||||
void saveGeometry();
|
||||
%Docstring
|
||||
Saves the size and position for the next time
|
||||
this dialog box will be used.
|
||||
%End
|
||||
|
||||
void restoreGeometry();
|
||||
%Docstring
|
||||
Restores the size and position from the last time
|
||||
this dialog box was used.
|
||||
%End
|
||||
|
||||
void setHighlight( QgsHighlight *h );
|
||||
%Docstring
|
||||
setHighlight
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "qgsattributedialog.h"
|
||||
|
||||
#include "qgsgui.h"
|
||||
#include "qgsattributeform.h"
|
||||
#include "qgshighlight.h"
|
||||
#include "qgsapplication.h"
|
||||
@ -40,18 +41,6 @@ QgsAttributeDialog::~QgsAttributeDialog()
|
||||
|
||||
if ( mOwnedFeature )
|
||||
delete mOwnedFeature;
|
||||
|
||||
saveGeometry();
|
||||
}
|
||||
|
||||
void QgsAttributeDialog::saveGeometry()
|
||||
{
|
||||
QgsSettings().setValue( mSettingsPath + "geometry", QDialog::saveGeometry() );
|
||||
}
|
||||
|
||||
void QgsAttributeDialog::restoreGeometry()
|
||||
{
|
||||
QDialog::restoreGeometry( QgsSettings().value( mSettingsPath + "geometry" ).toByteArray() );
|
||||
}
|
||||
|
||||
void QgsAttributeDialog::setHighlight( QgsHighlight *h )
|
||||
@ -85,6 +74,7 @@ void QgsAttributeDialog::reject()
|
||||
|
||||
void QgsAttributeDialog::init( QgsVectorLayer *layer, QgsFeature *feature, const QgsAttributeEditorContext &context, bool showDialogButtons )
|
||||
{
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
QgsAttributeEditorContext trackedContext = context;
|
||||
setWindowTitle( tr( "%1 - Feature Attributes" ).arg( layer->name() ) );
|
||||
setLayout( new QGridLayout() );
|
||||
@ -114,7 +104,6 @@ void QgsAttributeDialog::init( QgsVectorLayer *layer, QgsFeature *feature, const
|
||||
delete menu;
|
||||
}
|
||||
|
||||
restoreGeometry();
|
||||
focusNextChild();
|
||||
}
|
||||
|
||||
|
@ -55,18 +55,6 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
|
||||
|
||||
~QgsAttributeDialog() override;
|
||||
|
||||
/**
|
||||
* Saves the size and position for the next time
|
||||
* this dialog box will be used.
|
||||
*/
|
||||
void saveGeometry();
|
||||
|
||||
/**
|
||||
* Restores the size and position from the last time
|
||||
* this dialog box was used.
|
||||
*/
|
||||
void restoreGeometry();
|
||||
|
||||
/**
|
||||
* \brief setHighlight
|
||||
* \param h The highlight. Ownership is taken.
|
||||
|
Loading…
x
Reference in New Issue
Block a user