Commit 672a1b77 authored by Kliment Yanev's avatar Kliment Yanev

Merge branch 'master' of github.com:kliment/Printrun

parents 094c6a1a eb569521
......@@ -131,10 +131,12 @@ class showstl(wx.Window):
t=time.time()
#print name
if name.lower().endswith(".stl"):
newname=name
#Filter out the path, just show the STL filename.
newname=os.path.split(name.lower())[1]
c=1
while newname in self.models:
newname=name+"(%d)"%c
newname=os.path.split(name.lower())[1]
newname=newname+"(%d)"%c
c+=1
self.models[newname]=stltool.stl(name)
self.models[newname].offsets=[0,0,0]
......
......@@ -727,7 +727,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
n = button.custombutton
self.custombuttons[n]=None
self.cbutton_save(n,None)
while self.custombuttons[-1] is None:
while len(self.custombuttons) and self.custombuttons[-1] is None:
del self.custombuttons[-1]
self.cbuttons_reload()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment