Allow square element to be a rectangle
This commit is contained in:
@ -215,8 +215,8 @@ class Painter(Widget):
|
||||
|
||||
# create new particle
|
||||
if touch.button=="right":
|
||||
#new=Cross(touchx,touchy)
|
||||
new=Disk(touchx,touchy)
|
||||
new=Cross(touchx,touchy)
|
||||
#new=Disk(touchx,touchy)
|
||||
# snap to lattice
|
||||
if self.lattice!=None:
|
||||
new.move(self.lattice.nearest_delta(new.elements[0].pos))
|
||||
@ -529,7 +529,7 @@ class Painter(Widget):
|
||||
continue
|
||||
if particle_type==CROSS_INDEX:
|
||||
candidate=Cross(pos.x,pos.y,color=color)
|
||||
elif particle_type==DISK_INDEX
|
||||
elif particle_type==DISK_INDEX:
|
||||
candidate=Disk(pos.x,pos.y,color=color)
|
||||
else:
|
||||
print("warning: ignoring line "+str(i)+" in file '"+file+"': unrecognized particle type: '"+entries[0]+"'",file=sys.stderr)
|
||||
|
Reference in New Issue
Block a user