Clear debug message when switching projects (#1523)

* Clear debug sidebar when switching project

* Delete a unnecessary comment

* Clear any filters the users has enabled

* Clear filter settings only when the user opens a project
This commit is contained in:
Hideki Nakamura
2018-01-06 01:13:02 +09:00
committed by Nick O'Leary
parent 5a6cde1446
commit 207d3d3340
4 changed files with 41 additions and 7 deletions

View File

@@ -183,6 +183,18 @@
};
RED.comms.subscribe("debug",this.handleDebugMessage);
this.clearMessageList = function() {
RED.debug.clearMessageList(true);
if (subWindow) {
try {
subWindow.postMessage({event:"projectChange"},"*");
} catch(err) {
console.log(err);
}
}
};
RED.events.on("project:change", this.clearMessageList);
$("#debug-tab-open").click(function(e) {
e.preventDefault();
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");