From 7b8505af6c74abd98462662acda0b2dbb46c328d Mon Sep 17 00:00:00 2001 From: Ben Connors Date: Mon, 2 Dec 2019 23:54:08 -0500 Subject: Tech run fixes --- interface/chaserview.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'interface/chaserview.py') diff --git a/interface/chaserview.py b/interface/chaserview.py index 2c94240..011d2bd 100755 --- a/interface/chaserview.py +++ b/interface/chaserview.py @@ -83,9 +83,11 @@ class ChaserView: self.win.addstr(1, 1, self.fit(("%d: "% c.id) + c.name + " (%s)" % ("Join" if c.type == JOIN else c.advance_mode), w, True), curses.A_REVERSE if self._highlight else 0) maxsteps = self._height - 4 + first = 0 if maxsteps < len(c.steps): if self._selected is None: - steps = c.steps[:maxsteps] + first = 0 + last = maxsteps else: last = min(self._selected + (maxsteps // 2), len(c.steps)) first = last - maxsteps @@ -111,11 +113,11 @@ class ChaserView: ft = "-" fid = "---" - t = "%s%3s%s|%s:%s:%s" % (ft, fid, '*' if (s.type == CHASERSTEP and s.duration_mode == MANUAL) else ' ', format_time(s.fade_in), format_time(s.duration), format_time(s.fade_out)) + t = "%s%3s%s|%s:%s:%s" % (ft, fid, '*' if (s.type == CHASERSTEP and s.duration_mode == MANUAL) else ' ', format_time(s.fade_in), format_time(s.duration if s.type != CHASERSTEP else s.length), format_time(s.fade_out)) self.win.addstr(n+2, 1, self.fit((self._numformat % (first+n)) + ": " + s.name, w-len(t), pad=True)+t, attrs) if first > 0: - self.win.addch(3, self._width//2, '⯅') + self.win.addch(2, self._width//2, '⯅') if last < len(c.steps): self.win.addch(self._height-1, self._width//2, '⯆') -- cgit v1.2.3