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

master
Kliment Yanev 2011-09-22 12:11:05 +02:00
commit 672a1b77d6
2 changed files with 5 additions and 3 deletions

View File

@ -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]

View File

@ -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()