Skip to content

Commit

Permalink
Insert date value in attribute editor
Browse files Browse the repository at this point in the history
  • Loading branch information
marco committed Oct 13, 2011
1 parent f8ed801 commit 10d81dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gui/qgsattributeeditor.cpp
Expand Up @@ -762,9 +762,15 @@ bool QgsAttributeEditor::setValue( QWidget *editor, QgsVectorLayer *vl, int idx,
case QgsVectorLayer::FileName:
case QgsVectorLayer::Calendar:
{
QLineEdit *le = editor->findChild<QLineEdit *>();
if ( le == NULL )
QLineEdit* le = qobject_cast<QLineEdit*>( editor );
if( !le )
{
le = editor->findChild<QLineEdit *>();
}
if ( !le )
{
return false;
}
le->setText( value.toString() );
}
break;
Expand Down

0 comments on commit 10d81dd

Please sign in to comment.