mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-22 00:14:55 -05:00
fix #2978
git-svn-id: http://svn.osgeo.org/qgis/trunk@14183 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
c593facc90
commit
fe9b709668
@ -156,7 +156,10 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
|
||||
mypLabel->setText( myFieldName + tr( " (txt)" ) );
|
||||
}
|
||||
|
||||
myWidget->setEnabled( vl->isEditable() );
|
||||
if ( vl->editType( it.key() ) != QgsVectorLayer::Immutable )
|
||||
{
|
||||
myWidget->setEnabled( vl->isEditable() );
|
||||
}
|
||||
|
||||
mypInnerLayout->addWidget( myWidget, index, 1 );
|
||||
mpIndizes << it.key();
|
||||
@ -181,7 +184,10 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
|
||||
|
||||
QgsAttributeEditor::createAttributeEditor( mDialog, myWidget, vl, it.key(), it.value() );
|
||||
|
||||
myWidget->setEnabled( vl->isEditable() );
|
||||
if ( vl->editType( it.key() ) != QgsVectorLayer::Immutable )
|
||||
{
|
||||
myWidget->setEnabled( vl->isEditable() );
|
||||
}
|
||||
|
||||
mpIndizes << it.key();
|
||||
mpWidgets << myWidget;
|
||||
|
||||
@ -318,6 +318,7 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
|
||||
case QgsVectorLayer::LineEdit:
|
||||
case QgsVectorLayer::TextEdit:
|
||||
case QgsVectorLayer::UniqueValuesEditable:
|
||||
case QgsVectorLayer::Immutable:
|
||||
{
|
||||
QLineEdit *le = NULL;
|
||||
QTextEdit *te = NULL;
|
||||
@ -381,6 +382,11 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
|
||||
{
|
||||
myWidget = pte;
|
||||
}
|
||||
|
||||
if ( myWidget )
|
||||
{
|
||||
myWidget->setDisabled( editType == QgsVectorLayer::Immutable );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -428,9 +434,6 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case QgsVectorLayer::Immutable:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
setValue( myWidget, vl, idx, value );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user