diff --git a/python/console/console_editor.py b/python/console/console_editor.py index a416f29b9f5c..d03afa459ac5 100644 --- a/python/console/console_editor.py +++ b/python/console/console_editor.py @@ -292,7 +292,7 @@ def shareOnGist(self, is_public): URL = "https://api.github.com/gists" - path = self.tab_widget.currentWidget().file_path() + path = self.code_editor_widget.filePath() filename = os.path.basename(path) if path else None filename = filename if filename else "pyqgis_snippet.py"