mirror of
				https://github.com/vsariola/sointu.git
				synced 2025-10-30 15:35:41 -04:00 
			
		
		
		
	fix(tracker): when changing unit type, use tracker.SetUnit
This commit is contained in:
		| @ -109,8 +109,7 @@ func (t *Tracker) layoutUnitTypeChooser() layout.Widget { | ||||
| 		paint.FillShape(gtx.Ops, unitSurfaceColor, clip.Rect{Max: image.Pt(gtx.Constraints.Max.X, gtx.Constraints.Max.Y)}.Op()) | ||||
| 		listElem := func(gtx C, i int) D { | ||||
| 			for t.ChooseUnitTypeBtns[i].Clicked() { | ||||
| 				u := defaultUnits[allUnits[i]] | ||||
| 				t.song.Patch.Instruments[t.CurrentInstrument].Units[t.CurrentUnit] = (&u).Copy() | ||||
| 				t.SetUnit(allUnits[i]) | ||||
| 			} | ||||
| 			labelStyle := LabelStyle{Text: allUnits[i], ShadeColor: black, Color: white, Font: labelDefaultFont, FontSize: unit.Sp(12)} | ||||
| 			bg := func(gtx C) D { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user