From d7e7550518f56dddd115c7544ae81d372f7df105 Mon Sep 17 00:00:00 2001 From: dmitri-mcguckin Date: Tue, 24 Aug 2021 21:52:19 -0400 Subject: [PATCH] Patch for issue #73 --- canopen_monitor/__init__.py | 2 +- canopen_monitor/ui/message_pane.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/canopen_monitor/__init__.py b/canopen_monitor/__init__.py index 40f036c..f01bd89 100755 --- a/canopen_monitor/__init__.py +++ b/canopen_monitor/__init__.py @@ -2,7 +2,7 @@ MAJOR = 4 MINOR = 0 -PATCH = 0 +PATCH = 1 APP_NAME = 'canopen-monitor' APP_DESCRIPTION = 'An NCurses-based TUI application for tracking activity' \ diff --git a/canopen_monitor/ui/message_pane.py b/canopen_monitor/ui/message_pane.py index dfba912..a88290d 100644 --- a/canopen_monitor/ui/message_pane.py +++ b/canopen_monitor/ui/message_pane.py @@ -98,7 +98,7 @@ def scroll_limit_x(self: MessagePane) -> int: """ The maximim columns the pad is allowed to shift by when scrolling """ - max_length = sum(list(map(lambda x: x.name, self.cols))) + max_length = sum(list(map(lambda x: x.length, self.cols))) occluded = max_length - self.d_width + 7 return occluded if(occluded > 0) else 0 @@ -182,9 +182,7 @@ def draw(self: MessagePane) -> None: # Get the messages to be displayed based on scroll positioning, # and adjust column widths accordingly - draw_messages = self.table.filter(self.types, - self.__top, - self.__top + self.d_height - 3) + draw_messages = self.table.filter(self.types, self.__top, self.__top + self.d_height - 3) self.__check_col_widths(draw_messages) # Draw the header and messages