Skip to content

Commit

Permalink
fix: Hide panel when no terminals are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlin7 committed Jul 20, 2023
1 parent 11a72a8 commit 38ceba3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 6 additions & 9 deletions biscuit/core/components/views/panel/terminal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def delete_terminal(self, terminal):
self.terminals.remove(terminal)

def set_active_terminal(self, terminal):
"set an existing editor to currently shown one"
"set an existing terminal to currently shown one"
for tab in self.tabs.tabs:
if tab.terminal == terminal:
self.tabs.set_active_tab(tab)
Expand All @@ -65,17 +65,14 @@ def python(self):
return self.default_terminals[1]

@property
def active_editor(self):
"Get active editor."
def active_terminal(self):
"Get active terminal."
if not self.tabs.active_tab:
return

return self.tabs.active_tab.editor
return self.tabs.active_tab.terminal

def refresh(self):
...
# if not len(self.editors) and self.empty:
# self.emptytab.grid()
# elif len(self.editors) and not self.empty:
# self.emptytab.grid_remove()
# self.empty = not self.empty
if not len(self.terminals):
self.master.toggle_panel()
3 changes: 3 additions & 0 deletions biscuit/core/layout/base/content/panel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ def logger(self):
@property
def terminal(self):
return self.default_views[1]

def toggle_panel(self):
self.master.toggle_panel()

0 comments on commit 38ceba3

Please sign in to comment.