Skip to content

Commit

Permalink
Fix Python init function call
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 11, 2013
1 parent a3ea7ce commit bfbd367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/qgsattributedialog.cpp
Expand Up @@ -393,19 +393,19 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat

mFormNr = smFormCounter++;

QString form = QString( "_qgis_featureform_%1 = wrapinstance( %2, QtGui.QDialog )" )
QString form = QString( "_qgis_featureform_%1 = sip.wrapinstance( %2, QtGui.QDialog )" )
.arg( mFormNr )
.arg(( unsigned long ) mDialog );

QString layer = QString( "_qgis_layer_%1 = wrapinstance( %2, qgis.core.QgsVectorLayer )" )
QString layer = QString( "_qgis_layer_%1 = sip.wrapinstance( %2, qgis.core.QgsVectorLayer )" )
.arg( vl->id() )
.arg(( unsigned long ) vl );

// Generate the unique ID of this feature. We used to use feature ID but some providers
// return a ID that is an invalid python variable when we have new unsaved features.
QDateTime dt = QDateTime::currentDateTime();
QString featurevarname = QString( "_qgis_feature_%1" ).arg( dt.toString( "yyyyMMddhhmmsszzz" ) );
QString feature = QString( "%1 = wrapinstance( %2, qgis.core.QgsFeature )" )
QString feature = QString( "%1 = sip.wrapinstance( %2, qgis.core.QgsFeature )" )
.arg( featurevarname )
.arg(( unsigned long ) mFeature );

Expand Down

0 comments on commit bfbd367

Please sign in to comment.