mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
[dxf] Allow users to recover original layer name after overriding it (by using the QgsFilterLineEdit with default value)
This commit is contained in:
parent
d9d6ad0079
commit
c2e248befc
@ -55,7 +55,8 @@ QWidget *FieldSelectorDelegate::createEditor( QWidget *parent, const QStyleOptio
|
||||
|
||||
if ( index.column() == LAYER_COL )
|
||||
{
|
||||
QLineEdit *le = new QLineEdit( parent );
|
||||
QgsFilterLineEdit *le = new QgsFilterLineEdit( parent, vl->name() );
|
||||
|
||||
return le;
|
||||
}
|
||||
else if ( index.column() == OUTPUT_LAYER_ATTRIBUTE_COL )
|
||||
@ -87,7 +88,7 @@ void FieldSelectorDelegate::setEditorData( QWidget *editor, const QModelIndex &i
|
||||
|
||||
if ( index.column() == LAYER_COL )
|
||||
{
|
||||
QLineEdit *le = qobject_cast< QLineEdit * >( editor );
|
||||
QgsFilterLineEdit *le = qobject_cast< QgsFilterLineEdit * >( editor );
|
||||
if ( le )
|
||||
{
|
||||
le->setText( index.data().toString() );
|
||||
@ -123,7 +124,7 @@ void FieldSelectorDelegate::setModelData( QWidget *editor, QAbstractItemModel *m
|
||||
|
||||
if ( index.column() == LAYER_COL )
|
||||
{
|
||||
QLineEdit *le = qobject_cast<QLineEdit *>( editor );
|
||||
QgsFilterLineEdit *le = qobject_cast<QgsFilterLineEdit *>( editor );
|
||||
if ( le )
|
||||
{
|
||||
model->setData( index, le->text() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user