Skip to content

Commit

Permalink
Refresh tree view on new events
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavion committed Feb 25, 2018
1 parent b055a00 commit 085017a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/tsrplugin/TsrPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public void actionPerformed(ActionEvent evt) {
}

protected void sendAnTSR(Program program) {
PluginTreeNode rootNode = getRootNode();
try {
String url = mSettings.getProperty("URL") + "/createtvb";

Expand Down Expand Up @@ -214,10 +213,7 @@ protected void sendAnTSR(Program program) {
}
in.close();
if (response.toString().contains("true")) {
program.mark(this);
program.validateMarking();
rootNode.addProgram(program);
rootNode.update();
getTsrList();
} else {
String msg = mLocalizer.msg( "channelError" ,"Channel '{}' could not be found in tvstreamrecord" ).replace("{}", sender);
JOptionPane.showMessageDialog(this.getParentFrame(), msg, "Error", JOptionPane.ERROR_MESSAGE);
Expand All @@ -238,7 +234,9 @@ protected void sendAnTSR(Program program) {

protected void getTsrList() {
PluginTreeNode rootNode = getRootNode();

rootNode.removeAllActions();
rootNode.removeAllChildren();

try {
String url = mSettings.getProperty("URL") + "/gettvb";

Expand Down

0 comments on commit 085017a

Please sign in to comment.