Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@112 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
- Loading branch information
volayaf
committed
Apr 17, 2012
1 parent
24ea829
commit 511ffb2
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from sextante.gui.ContextAction import ContextAction | ||
from sextante.modeler.ModelerAlgorithm import ModelerAlgorithm | ||
import os | ||
|
||
class DeleteModelAction(ContextAction): | ||
|
||
def __init__(self): | ||
self.name="Delete model" | ||
|
||
def isEnabled(self): | ||
return isinstance(self.alg, ModelerAlgorithm) | ||
|
||
def execute(self): | ||
os.remove(self.alg.descriptionFile) | ||
self.toolbox.updateTree() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters