src/mainwindow.cpp

changeset 21
0133e565e072
parent 16
aeb5f203b3eb
child 23
3387a84ddaba
equal deleted inserted replaced
20:cef43609a374 21:0133e565e072
115 this->updateRecentlyOpenedDocumentsMenu(); 115 this->updateRecentlyOpenedDocumentsMenu();
116 } 116 }
117 117
118 void MainWindow::openModelForEditing(const QString& modelName) 118 void MainWindow::openModelForEditing(const QString& modelName)
119 { 119 {
120 Document* document = new Document{this->documents.findModelByName(modelName)}; 120 Document* document = new Document{this->documents.findModelByName(modelName), &this->documents};
121 this->ui->tabs->addTab(document, modelName); 121 this->ui->tabs->addTab(document, modelName);
122 this->ui->tabs->setCurrentWidget(document); 122 this->ui->tabs->setCurrentWidget(document);
123 document->restoreSplitterState(this->documentSplitterState); 123 document->restoreSplitterState(this->documentSplitterState);
124 connect(document, &Document::splitterChanged, this, &MainWindow::handleDocumentSplitterChange); 124 connect(document, &Document::splitterChanged, this, &MainWindow::handleDocumentSplitterChange);
125 } 125 }

mercurial