Commit 3be01c92 authored by Kliment's avatar Kliment

Auto-select last opened object, faster rotation

parent e94986b9
......@@ -87,6 +87,7 @@ class showstl(wx.Window):
self.models[newname].offsets=[0,0,0]
#print time.time()-t
self.l.Append([stlwrap(self.models[newname],newname)])
self.l.Select(self.l.GetItemCount()-1)
self.Refresh()
#print time.time()-t
......@@ -125,7 +126,7 @@ class showstl(wx.Window):
i=self.l.GetFirstSelected()
if i != -1:
o=self.models[self.l.GetItemText(i)].offsets
self.models[self.l.GetItemText(i)]=self.models[self.l.GetItemText(i)].rotate([0,0,self.i-self.previ])
self.models[self.l.GetItemText(i)]=self.models[self.l.GetItemText(i)].rotate([0,0,5*(self.i-self.previ)])
self.models[self.l.GetItemText(i)].offsets=o
self.previ=self.i
wx.CallAfter(self.Refresh)
......
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