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

make .plotTree a single instance window and add ServerTreeView #6294

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion SCClassLibrary/Common/Control/Server.sc
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Server {
var <defaultGroup, <defaultGroups;

var <syncThread, <syncTasks;
var <window, <>scopeWindow, <serverMeter, <emacsbuf;
var <window, <>scopeWindow, <serverMeter, <emacsbuf, <plotTreeWindow;
var <volume, <recorder, <statusWatcher;
var <pid, serverInterface;
var pidReleaseCondition;
Expand Down
18 changes: 12 additions & 6 deletions SCClassLibrary/Common/GUI/PlusGUI/Control/ServerPlusGUI.sc
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,21 @@
this.startAliveThread;
}

plotTree {|interval=0.5|
var onClose, window = Window.new(name.asString + "Node Tree",
plotTree { |interval=0.5|
var onClose;
if(plotTreeWindow.isNil) {
plotTreeWindow = Window.new(name.asString + "Node Tree",
Rect(128, 64, 400, 400),
scroll:true
).front;
window.view.hasHorizontalScroller_(false).background_(Color.grey(0.9));
onClose = this.plotTreeView(interval, window.view, { defer {window.close}; });
window.onClose = {
);
plotTreeWindow.view.hasHorizontalScroller_(false).background_(Color.grey(0.9)).front
} {
plotTreeWindow.front;
};
onClose = this.plotTreeView(interval, plotTreeWindow.view, { defer { plotTreeWindow.close } });
plotTreeWindow.onClose = {
onClose.value;
plotTreeWindow = nil
};
}

Expand Down