Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GUI (Vector layer properties) QSplitter for fields properties tab
  • Loading branch information
m-kuhn committed May 13, 2013
1 parent e7f8326 commit 858a1fb
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 237 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsfieldsproperties.cpp
Expand Up @@ -166,6 +166,8 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent
setupUi( this );
setupEditTypes();

mSplitter->restoreState( QSettings().value( "/Windows/VectorLayerProperties/FieldsProperties/SplitState" ).toByteArray() );

// Init as hidden by default, it will be enabled if project is set to
mAttributeEditorOptionsWidget->setVisible( false );

Expand Down Expand Up @@ -206,6 +208,11 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent
updateButtons();
}

QgsFieldsProperties::~QgsFieldsProperties()
{
QSettings().setValue( "/Windows/VectorLayerProperties/FieldsProperties/SplitState", mSplitter->saveState() );
}

void QgsFieldsProperties::init()
{
loadRows();
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsfieldsproperties.h
Expand Up @@ -63,6 +63,8 @@ class QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPropertiesBase
public:
QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent = 0 );

~QgsFieldsProperties();

/**Adds an attribute to the table (but does not commit it yet)
@param field the field to add
@return false in case of a name conflict, true in case of success */
Expand Down

0 comments on commit 858a1fb

Please sign in to comment.