Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fixed problem with saving first entry
- Loading branch information
|
@@ -46,7 +46,7 @@ QgsAttributesFormProperties::QgsAttributesFormProperties( QgsVectorLayer *layer, |
|
|
mFormLayoutTree->setType( DnDTree::Type::Drop ); |
|
|
|
|
|
// AttributeTypeDialog |
|
|
mAttributeTypeDialog = new QgsAttributeTypeDialog( mLayer, 0, mAttributeTypeFrame ); |
|
|
mAttributeTypeDialog = new QgsAttributeTypeDialog( mLayer, -1, mAttributeTypeFrame ); |
|
|
mAttributeTypeDialog->layout()->setMargin( 0 ); |
|
|
mAttributeTypeFrame->layout()->setMargin( 0 ); |
|
|
mAttributeTypeFrame->layout()->addWidget( mAttributeTypeDialog ); |
|
@@ -79,8 +79,8 @@ void QgsAttributesFormProperties::init() |
|
|
initLayoutConfig(); |
|
|
initInitPython(); |
|
|
|
|
|
//mAttributeTypeDialog->setEnabled( false ); |
|
|
//mAttributeRelationEdit->setEnabled( false ); |
|
|
mAttributeTypeDialog->setEnabled( false ); |
|
|
mAttributeRelationEdit->setEnabled( false ); |
|
|
} |
|
|
|
|
|
void QgsAttributesFormProperties::initAvailableWidgetsTree() |
|
@@ -264,6 +264,9 @@ void QgsAttributesFormProperties::loadAttributeTypeDialog() |
|
|
|
|
|
void QgsAttributesFormProperties::storeAttributeTypeDialog() |
|
|
{ |
|
|
if ( mAttributeTypeDialog->fieldIdx() < 0 ) |
|
|
return; |
|
|
|
|
|
FieldConfig cfg; |
|
|
|
|
|
cfg.mEditable = mAttributeTypeDialog->fieldEditable(); |
|
|
|
@@ -45,8 +45,9 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx |
|
|
, mFieldIdx( fieldIdx ) |
|
|
{ |
|
|
setupUi( this ); |
|
|
//removed selectionListWidget: connect( selectionListWidget, &QListWidget::currentRowChanged, this, &QgsAttributeTypeDialog::selectionListWidget_currentRowChanged ); |
|
|
setWindowTitle( tr( "Edit Widget Properties - %1 (%2)" ).arg( vl->fields().at( fieldIdx ).name(), vl->name() ) ); |
|
|
|
|
|
if ( fieldIdx < 0 ) |
|
|
return; |
|
|
|
|
|
QMapIterator<QString, QgsEditorWidgetFactory *> it( QgsGui::editorWidgetRegistry()->factories() ); |
|
|
QStandardItemModel *widgetTypeModel = qobject_cast<QStandardItemModel *>( mWidgetTypeComboBox->model() ); |
|
@@ -89,11 +90,6 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx |
|
|
restoreGeometry( settings.value( QStringLiteral( "Windows/QgsAttributeTypeDialog/geometry" ) ).toByteArray() ); |
|
|
|
|
|
constraintExpressionWidget->setLayer( vl ); |
|
|
|
|
|
// TODO, what should this help be connected to? |
|
|
#if 0 |
|
|
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsAttributeTypeDialog::showHelp ); |
|
|
#endif |
|
|
} |
|
|
|
|
|
QgsAttributeTypeDialog::~QgsAttributeTypeDialog() |
|
|