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

Clear panels on restart #2

Merged
merged 1 commit into from
Sep 3, 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
12 changes: 9 additions & 3 deletions socket_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ def __init__(self):
self.sock.settimeout(1)
self.running = True

self.clear_panel('oz_compiler')
self.clear_panel('oz_output')


def clear_panel(self, panel_name):
panel = self.window.find_output_panel(panel_name)
if panel:
self.window.destroy_output_panel(panel_name)

def write_compiler(self, s):
self.write_panel(s, "oz_compiler")

Expand Down Expand Up @@ -92,9 +101,6 @@ def run(self):
self.sock.shutdown(socket.SHUT_RDWR)
self.sock.close()
self.process.wait()
panel = self.window.find_output_panel("oz_panel")
if panel is not None:
self.window.destroy_output_panel("oz_panel")

def stop(self):
exit_msg = "{Application.exit 0}\n\004\n\n"
Expand Down