summaryrefslogtreecommitdiff
path: root/interface/chaserview.py
diff options
context:
space:
mode:
authorBen Connors <benconnors@outlook.com>2019-12-02 23:54:08 -0500
committerBen Connors <benconnors@outlook.com>2019-12-02 23:54:08 -0500
commit7b8505af6c74abd98462662acda0b2dbb46c328d (patch)
tree262b7848bb3bc2482bfb3d9907e5b18991c0fcb9 /interface/chaserview.py
parent59ef8f9225098efa1512e048cea03b3a22bc7c11 (diff)
Tech run fixes
Diffstat (limited to 'interface/chaserview.py')
-rwxr-xr-xinterface/chaserview.py8
1 files changed, 5 insertions, 3 deletions
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, '⯆')