25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
From e122aae1a2dfa510c6708db99998756bbdddeced Mon Sep 17 00:00:00 2001
|
|
From: Jaime van Kessel <nallath@gmail.com>
|
|
Date: Wed, 28 Jun 2017 16:43:28 +0200
|
|
Subject: [PATCH] Fixed the incorrect number removal check for unique name
|
|
|
|
---
|
|
UM/Settings/ContainerRegistry.py | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/UM/Settings/ContainerRegistry.py b/UM/Settings/ContainerRegistry.py
|
|
index dc4a25bcc..084ec04ae 100644
|
|
--- a/UM/Settings/ContainerRegistry.py
|
|
+++ b/UM/Settings/ContainerRegistry.py
|
|
@@ -351,8 +351,9 @@ def uniqueName(self, original: str) -> str:
|
|
|
|
if not name: #Wait, that deleted everything!
|
|
name = "Profile"
|
|
- elif not self.findContainers(id = name, ignore_case = True) and not self.findContainers(name = name):
|
|
- return name
|
|
+ elif not self.findContainers(id = original.strip(), ignore_case = True) and not self.findContainers(name = original.strip()):
|
|
+ # Check if the stripped version of the name is unique (note that this can still have the number in it)
|
|
+ return original.strip()
|
|
|
|
unique_name = name
|
|
i = 1
|