Skip to content
Permalink
Browse files

Make sure iface is available when executing dropped python scripts

  • Loading branch information
nyalldawson committed Sep 20, 2017
1 parent fc10b77 commit 695cf6b5d5079db56921fa84f1306d022e4862f9
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/app/qgisapp.cpp
@@ -5554,6 +5554,7 @@ void QgisApp::runScript( const QString &filePath )

mPythonUtils->runString(
QString( "import sys\n"
"from qgis.utils import iface\n"
"exec(open(\"%1\".replace(\"\\\\\", \"/\").encode(sys.getfilesystemencoding())).read())\n" ).arg( filePath )
, tr( "Failed to run Python script:" ), false );
#endif

0 comments on commit 695cf6b

Please sign in to comment.
You can’t perform that action at this time.