Skip to content
Permalink
Browse files

remove useless action from script editor

  • Loading branch information
ghtmtt authored and nyalldawson committed Mar 31, 2018
1 parent 61c3b48 commit deaeaa6e97e2ba140f39b2758c50242f2d29bbad
Showing with 0 additions and 19 deletions.
  1. +0 −19 python/plugins/processing/script/ScriptEditorDialog.py
@@ -72,8 +72,6 @@ def __init__(self, filePath=None, parent=None):
QgsApplication.getThemeIcon('/mActionFileSave.svg'))
self.actionSaveScriptAs.setIcon(
QgsApplication.getThemeIcon('/mActionFileSaveAs.svg'))
self.actionLoadFromTemplate.setIcon(
QgsApplication.getThemeIcon('/mActionOpenFromTemplate.svg'))
self.actionRunScript.setIcon(
QgsApplication.getThemeIcon('/mActionStart.svg'))
self.actionCut.setIcon(
@@ -97,7 +95,6 @@ def __init__(self, filePath=None, parent=None):
self.actionOpenScript.triggered.connect(self.openScript)
self.actionSaveScript.triggered.connect(self.save)
self.actionSaveScriptAs.triggered.connect(self.saveAs)
self.actionLoadFromTemplate.triggered.connect(self.loadFrom)
self.actionRunScript.triggered.connect(self.runAlgorithm)
self.actionCut.triggered.connect(self.editor.cut)
self.actionCopy.triggered.connect(self.editor.copy)
@@ -169,22 +166,6 @@ def save(self):
def saveAs(self):
self.saveScript(True)

def loadFrom(self):
if self.hasChanged:
ret = QMessageBox.warning(self,
self.tr("Load Script From Template"),
self.tr("There are unsaved changes in the script. Continue?"),
QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if ret == QMessageBox.No:
return

templatePath = os.path.join(
pluginPath, 'script', 'ScriptTemplate.py')

with codecs.open(templatePath, 'r', encoding='utf-8') as f:
templateTxt = f.read()
self.editor.setText(templateTxt)

def saveScript(self, saveAs):
newPath = None
if self.filePath is None or saveAs:

0 comments on commit deaeaa6

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