Skip to content
Permalink
Browse files
Keep the return value of Python init function alive while form open
  • Loading branch information
NathanW2 committed Jul 26, 2013
1 parent 04068c9 commit 99d82c2413d4c213e95cbe327307ea1c25d39208
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/qgsattributedialog.cpp
@@ -423,11 +423,13 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
QgsPythonRunner::run( feature );
QgsPythonRunner::run( layer );

QString expr = QString( "%1(_qgis_featureform_%2, _qgis_layer_%3, %4)" )
QString returnvarname = QString( "_qgis_feature_form_%1" ).arg( dt.toString( "yyyyMMddhhmmsszzz" ) );
QString expr = QString( "%5 = %1(_qgis_featureform_%2, _qgis_layer_%3, %4)" )
.arg( vl->editFormInit() )
.arg( mFormNr )
.arg( vl->id() )
.arg( featurevarname );
.arg( featurevarname )
.arg( returnvarname );

QgsDebugMsg( QString( "running featureForm init: %1" ).arg( expr ) );
QgsPythonRunner::run( expr );

0 comments on commit 99d82c2

Please sign in to comment.