From cf991dc2d8694bfc6d457133b44cb4a760f93724 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 07:53:44 +0300 Subject: Autocommit at 29.05.2022 @ 07:53 --- src/UserInterface/UserInterface.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/UserInterface/UserInterface.cpp') diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index f9d7d87..8698a71 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -6,16 +6,17 @@ /* Private (static) */ void UserInterface::com_print(const char* params) { - List cells = this->table.getAllCells(); + List cells = table.getAllCells(); } /* Public */ UserInterface::UserInterface(Table& table) : menu() { - if (this->table.getCellCount() > 0) - throw new std::logic_error("Singleton instance!"); + if (!instantiated) { + this->table = table; + instantiated = true; + } - this->table = table; menu.addCommand(Command("print", com_print)); menu.addCommand(Command("edit", com_edit)); } -- cgit v1.3.1-23-gd82d