This commit is contained in:
Nathan Woodrow 2012-12-10 23:48:07 +10:00
parent 9e829cb532
commit 289a20727c

View File

@ -212,9 +212,11 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
}
// Set focus to first widget in list, to help entering data without moving the mouse.
if ( mProxyWidgets.size() > 0 )
if ( mypInnerLayout->rowCount() > 0 )
{
( *mProxyWidgets.begin() )->setFocus( Qt::OtherFocusReason );
QWidget* widget = mypInnerLayout->itemAtPosition( 0, 1 )->widget();
if ( widget )
widget->setFocus( Qt::OtherFocusReason );
}
}
else