src/mainwindow.cpp

changeset 1379
35811339ea72
parent 1378
86e5a2259f58
child 1380
bc799b965418
equal deleted inserted replaced
1378:86e5a2259f58 1379:35811339ea72
862 { 862 {
863 // Create a new anonymous file and set it to our current 863 // Create a new anonymous file and set it to our current
864 LDDocument* f = newDocument(); 864 LDDocument* f = newDocument();
865 f->setName (""); 865 f->setName ("");
866 changeDocument (f); 866 changeDocument (f);
867 closeInitialDocument();
868 doFullRefresh(); 867 doFullRefresh();
869 updateActions(); 868 updateActions();
870 } 869 }
871 870
872 // --------------------------------------------------------------------------------------------------------------------- 871 // ---------------------------------------------------------------------------------------------------------------------
978 } 977 }
979 978
980 m_renderers.remove(document); 979 m_renderers.remove(document);
981 } 980 }
982 981
983 // ---------------------------------------------------------------------------------------------------------------------
984 //
985 // This little beauty closes the initial file that was open at first when opening a new file over it.
986 //
987 void MainWindow::closeInitialDocument()
988 {
989 /*
990 if (length(m_documents) == 2 and
991 m_documents[0]->name().isEmpty() and
992 not m_documents[1]->name().isEmpty() and
993 not m_documents[0]->hasUnsavedChanges())
994 {
995 m_documents.first()->close();
996 }
997 */
998 }
999
1000 QModelIndexList MainWindow::selectedIndexes() const 982 QModelIndexList MainWindow::selectedIndexes() const
1001 { 983 {
1002 return this->ui.objectList->selectionModel()->selectedIndexes(); 984 return this->ui.objectList->selectionModel()->selectedIndexes();
1003 } 985 }
1004 986

mercurial