Skip to content
Permalink
Browse files
Reload form module if DEBUGMODE switch set in module
  • Loading branch information
NathanW2 committed Mar 30, 2013
1 parent 50c3303 commit 67b9c488914b37466eac43ded40fd7a62b2a1350
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/gui/qgsattributedialog.cpp
@@ -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 )" )

0 comments on commit 67b9c48

Please sign in to comment.