Skip to content

Commit 858a1fb

Browse files
committed
GUI (Vector layer properties) QSplitter for fields properties tab
1 parent e7f8326 commit 858a1fb

File tree

3 files changed

+253
-237
lines changed

3 files changed

+253
-237
lines changed

src/app/qgsfieldsproperties.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent
166166
setupUi( this );
167167
setupEditTypes();
168168

169+
mSplitter->restoreState( QSettings().value( "/Windows/VectorLayerProperties/FieldsProperties/SplitState" ).toByteArray() );
170+
169171
// Init as hidden by default, it will be enabled if project is set to
170172
mAttributeEditorOptionsWidget->setVisible( false );
171173

@@ -206,6 +208,11 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent
206208
updateButtons();
207209
}
208210

211+
QgsFieldsProperties::~QgsFieldsProperties()
212+
{
213+
QSettings().setValue( "/Windows/VectorLayerProperties/FieldsProperties/SplitState", mSplitter->saveState() );
214+
}
215+
209216
void QgsFieldsProperties::init()
210217
{
211218
loadRows();

src/app/qgsfieldsproperties.h

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPropertiesBase
6363
public:
6464
QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent = 0 );
6565

66+
~QgsFieldsProperties();
67+
6668
/**Adds an attribute to the table (but does not commit it yet)
6769
@param field the field to add
6870
@return false in case of a name conflict, true in case of success */

0 commit comments

Comments
 (0)