MCPcopy Create free account
hub / github.com/BuddySirJava/SSH-Studio / undo_add

Method undo_add

src/ui/main_window.py:601–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599 self.is_dirty = True
600
601 def undo_add():
602 try:
603 if host in self.parser.config.hosts:
604 self.parser.config.remove_host(host)
605 self.is_dirty = self.parser.config.is_dirty()
606 self.host_list.load_hosts(self.parser.config.hosts)
607 try:
608 if not self.parser.config.hosts:
609 self._set_host_editor_visible(False)
610 except Exception:
611 pass
612 except Exception:
613 pass
614
615 self._show_undo_toast(_("Host added"), undo_add)
616 self._set_host_editor_visible(True)

Callers

nothing calls this directly

Calls 4

remove_hostMethod · 0.80
is_dirtyMethod · 0.80
load_hostsMethod · 0.80

Tested by

no test coverage detected