mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
columns: auto size time column when setting base time
Base time formatting adds + or - in front of the timestamp, so the column has to grow a little to not hide the last digit. Also fixes a crash when setting the base time while the time column is hidden.
This commit is contained in:
parent
265cc8afdf
commit
ca9a31ddd9
2 changed files with 11 additions and 2 deletions
|
@ -457,6 +457,16 @@ class ColumnManager (Common.GUI.Manager):
|
|||
|
||||
self.zoom = scale
|
||||
|
||||
def set_base_time (self, base_time):
|
||||
|
||||
try:
|
||||
time_column = self.find_item (name = TimeColumn.name)
|
||||
except KeyError:
|
||||
return
|
||||
|
||||
time_column.set_base_time (base_time)
|
||||
self.size_column (time_column)
|
||||
|
||||
def get_toggle_action (self, column_class):
|
||||
|
||||
action_name = "show-%s-column" % (column_class.name,)
|
||||
|
|
|
@ -674,8 +674,7 @@ class Window (object):
|
|||
def handle_set_base_time_action_activate (self, action):
|
||||
|
||||
row = self.get_active_line ()
|
||||
time_column = self.column_manager.find_item (name = "time")
|
||||
time_column.set_base_time (row[LogModelBase.COL_TIME])
|
||||
self.column_manager.set_base_time (row[LogModelBase.COL_TIME])
|
||||
|
||||
def handle_hide_log_level_action_activate (self, action):
|
||||
|
||||
|
|
Loading…
Reference in a new issue