Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reload form module if DEBUGMODE switch set in module
  • Loading branch information
NathanW2 committed Mar 30, 2013
1 parent 50c3303 commit 67b9c48
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/qgsattributedialog.cpp
Expand Up @@ -346,6 +346,14 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
QgsPythonRunner::run( QString( "import %1" ).arg( module.left( pos ) ) );
}

/* Reload the module if the DEBUGMODE switch has been set in the module.
If set to False you have to reload QGIS to reset it to True due to Python
module caching */
QString reload = QString("if hasattr(%1,'DEBUGMODE') and %1.DEBUGMODE:"
" reload(%1)").arg( module.left( pos ) );

QgsPythonRunner::run( reload );

mFormNr = smFormCounter++;

QString form = QString( "_qgis_featureform_%1 = wrapinstance( %2, QtGui.QDialog )" )
Expand Down

0 comments on commit 67b9c48

Please sign in to comment.