# HG changeset patch # User Teemu Piippo # Date 1522830277 -10800 # Node ID 35811339ea728ec01095448c7adf409d0bcddc8d # Parent 86e5a2259f58ea509d91ff5c2e5e033e11905a48 removed dead code diff -r 86e5a2259f58 -r 35811339ea72 src/documentmanager.cpp --- a/src/documentmanager.cpp Wed Apr 04 11:22:47 2018 +0300 +++ b/src/documentmanager.cpp Wed Apr 04 11:24:37 2018 +0300 @@ -120,7 +120,6 @@ } m_window->openDocumentForEditing(file); - m_window->closeInitialDocument(); m_window->changeDocument (file); m_window->doFullRefresh(); addRecentFile (path); diff -r 86e5a2259f58 -r 35811339ea72 src/mainwindow.cpp --- a/src/mainwindow.cpp Wed Apr 04 11:22:47 2018 +0300 +++ b/src/mainwindow.cpp Wed Apr 04 11:24:37 2018 +0300 @@ -864,7 +864,6 @@ LDDocument* f = newDocument(); f->setName (""); changeDocument (f); - closeInitialDocument(); doFullRefresh(); updateActions(); } @@ -980,23 +979,6 @@ m_renderers.remove(document); } -// --------------------------------------------------------------------------------------------------------------------- -// -// This little beauty closes the initial file that was open at first when opening a new file over it. -// -void MainWindow::closeInitialDocument() -{ -/* - if (length(m_documents) == 2 and - m_documents[0]->name().isEmpty() and - not m_documents[1]->name().isEmpty() and - not m_documents[0]->hasUnsavedChanges()) - { - m_documents.first()->close(); - } -*/ -} - QModelIndexList MainWindow::selectedIndexes() const { return this->ui.objectList->selectionModel()->selectedIndexes(); diff -r 86e5a2259f58 -r 35811339ea72 src/mainwindow.h --- a/src/mainwindow.h Wed Apr 04 11:22:47 2018 +0300 +++ b/src/mainwindow.h Wed Apr 04 11:24:37 2018 +0300 @@ -66,7 +66,6 @@ void applyToActions(function function); void changeDocument (LDDocument* f); void clearSelection(); - void closeInitialDocument(); void createBlankDocument(); LDDocument* currentDocument(); void currentDocumentClosed();