Skip to content
Snippets Groups Projects
Commit 0cfb687d authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

rename: Don't "create new" when input already exists

When you type something into the rename tool which has an exact match in
the suggestions, don't call the "create new item" action but instead just apply
the exact match.

Fixes #82
parent e4a7d782
No related branches found
No related tags found
No related merge requests found
......@@ -614,11 +614,17 @@ class RenameActivity:
s.clear_query()
return True
elif len(s.query)>0:
item=None
for sugg in s.suggestions:
if sugg[0]==s.query:
item=sugg
break
if item is None:
s.actCreateAlias.createAlias(s.query)
item=s.actCreateAlias.execute()
s.aliases.save()
if item!=None:
if item is not None:
if s.addItem(item):
s.clear_query()
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment