Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure hide ignored persists across packet changes #857

Merged
1 commit merged into from
Aug 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions lib/cosmos/tools/packet_viewer/packet_viewer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,7 @@ def initialize_actions
@hide_ignored_action.statusTip = 'Toggle showing and hiding ignored items'
@hide_ignored_action.setCheckable(true)
@hide_ignored_action.setChecked(false)
@hide_ignored_action.connect(SIGNAL('triggered()')) do
if @hide_ignored_action.isChecked
@ignored_rows.each {|row| @table.setRowHidden(row, true) }
else
@ignored_rows.each {|row| @table.setRowHidden(row, false) }
end
end
@hide_ignored_action.connect(SIGNAL('triggered()')) { hide_ignored() }

@derived_last_action = Qt::Action.new('&Display Derived Last', self)
@derived_last_keyseq = Qt::KeySequence.new('Ctrl+D')
Expand Down Expand Up @@ -284,6 +278,14 @@ def toggle_replay_mode
end
end

def hide_ignored
if @hide_ignored_action.isChecked
@ignored_rows.each {|row| @table.setRowHidden(row, true) }
else
@ignored_rows.each {|row| @table.setRowHidden(row, false) }
end
end

def edit_definition
# Grab all the cmd_tlm_files and processes them in reverse sort order
# because typically we'll have cmd.txt and tlm.txt and we want to process
Expand Down Expand Up @@ -430,6 +432,7 @@ def update_tlm_items(featured_item_name = nil)
@descriptions[row][1] = description
row += 1
end
hide_ignored()

@table.resizeColumnsToContents()
@table.resizeRowsToContents()
Expand Down