Start from: Avoid add to templates if already present
This commit is contained in:
parent
7636f7611b
commit
06bf637da9
@ -312,7 +312,7 @@ class CT_OT_start_from(Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
prefs = pref()
|
prefs = pref()
|
||||||
if self.filepath:
|
if self.filepath:
|
||||||
if self.add:
|
if self.add and not already_present(self, prefs, self.filepath):
|
||||||
template = prefs.projects.add()
|
template = prefs.projects.add()
|
||||||
template.name = self.name if self.name else name_from_path(self.filepath)
|
template.name = self.name if self.name else name_from_path(self.filepath)
|
||||||
template.path = self.filepath
|
template.path = self.filepath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user