Merge pull request #1177

* Fixes message filtering that was not being initialized.  Fixes minor spotted code issues
This commit is contained in:
Andrzej Pańkowski
2022-04-30 10:25:33 +02:00
committed by GitHub
parent 166383e1ed
commit 1152b13220
8 changed files with 27 additions and 47 deletions

View File

@@ -62,6 +62,11 @@ public class MessageActivityModel extends AbstractTableModel implements Listener
mMessageFilterSet = filterSet;
}
public void clearFilters()
{
mMessageFilterSet = new FilterSet<>(new AllPassFilter<>());
}
/**
* Clears all messages from history
*/
@@ -203,4 +208,4 @@ public class MessageActivityModel extends AbstractTableModel implements Listener
return null;
}
}
}

View File

@@ -26,6 +26,7 @@ import io.github.dsheirer.filter.FilterSet;
import io.github.dsheirer.message.IMessage;
import io.github.dsheirer.message.MessageHistory;
import io.github.dsheirer.module.ProcessingChain;
import io.github.dsheirer.module.decode.DecoderFactory;
import io.github.dsheirer.preference.UserPreferences;
import io.github.dsheirer.preference.swing.JTableColumnWidthMonitor;
import io.github.dsheirer.sample.Listener;
@@ -91,6 +92,7 @@ public class MessageActivityPanel extends JPanel implements Listener<ProcessingC
if(processingChain != null)
{
mCurrentMessageHistory = processingChain.getMessageHistory();
mMessageModel.setFilters(DecoderFactory.getMessageFilters(processingChain.getModules()));
mMessageModel.clearAndSet(mCurrentMessageHistory.getItems());
mCurrentMessageHistory.addListener(mMessageModel);
mManagementPanel.enableButtons();
@@ -98,6 +100,7 @@ public class MessageActivityPanel extends JPanel implements Listener<ProcessingC
else
{
mCurrentMessageHistory = null;
mMessageModel.clearFilters();
mMessageModel.clear();
mManagementPanel.disableButtons();
}

View File

@@ -1,25 +0,0 @@
/*******************************************************************************
* sdr-trunk
* Copyright (C) 2014-2018 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/
package io.github.dsheirer.module.decode.mpt1327;
/**
* MPT-1327 Ident Value Types
*/
public enum MPT1327IdentType
{
}