@@ -72,8 +72,6 @@ def __init__(self, filePath=None, parent=None):
72
72
QgsApplication .getThemeIcon ('/mActionFileSave.svg' ))
73
73
self .actionSaveScriptAs .setIcon (
74
74
QgsApplication .getThemeIcon ('/mActionFileSaveAs.svg' ))
75
- self .actionLoadFromTemplate .setIcon (
76
- QgsApplication .getThemeIcon ('/mActionOpenFromTemplate.svg' ))
77
75
self .actionRunScript .setIcon (
78
76
QgsApplication .getThemeIcon ('/mActionStart.svg' ))
79
77
self .actionCut .setIcon (
@@ -97,7 +95,6 @@ def __init__(self, filePath=None, parent=None):
97
95
self .actionOpenScript .triggered .connect (self .openScript )
98
96
self .actionSaveScript .triggered .connect (self .save )
99
97
self .actionSaveScriptAs .triggered .connect (self .saveAs )
100
- self .actionLoadFromTemplate .triggered .connect (self .loadFrom )
101
98
self .actionRunScript .triggered .connect (self .runAlgorithm )
102
99
self .actionCut .triggered .connect (self .editor .cut )
103
100
self .actionCopy .triggered .connect (self .editor .copy )
@@ -169,22 +166,6 @@ def save(self):
169
166
def saveAs (self ):
170
167
self .saveScript (True )
171
168
172
- def loadFrom (self ):
173
- if self .hasChanged :
174
- ret = QMessageBox .warning (self ,
175
- self .tr ("Load Script From Template" ),
176
- self .tr ("There are unsaved changes in the script. Continue?" ),
177
- QMessageBox .Yes | QMessageBox .No , QMessageBox .No )
178
- if ret == QMessageBox .No :
179
- return
180
-
181
- templatePath = os .path .join (
182
- pluginPath , 'script' , 'ScriptTemplate.py' )
183
-
184
- with codecs .open (templatePath , 'r' , encoding = 'utf-8' ) as f :
185
- templateTxt = f .read ()
186
- self .editor .setText (templateTxt )
187
-
188
169
def saveScript (self , saveAs ):
189
170
newPath = None
190
171
if self .filePath is None or saveAs :
0 commit comments