-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index bb85a24..7394623 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp @@ -208,49 +208,49 @@ void MainWindow::selectorFileNew(const DocLnk &lnkDoc) listSheets.clear(); comboSheets->clear(); typeSheet *newSheet=createNewSheet(); newSheet->data.setAutoDelete(TRUE); sheet->setName(newSheet->name); sheet->setSheetData(&newSheet->data); for (int i=1; i<DEFAULT_NUM_SHEETS; ++i) createNewSheet(); documentModified=FALSE; } void MainWindow::closeEvent(QCloseEvent *e) { if (documentModified && saveCurrentFile()==QMessageBox::Cancel) e->ignore(); else e->accept(); } void MainWindow::selectorFileOpen(const DocLnk &lnkDoc) { selectorHide(); if (documentModified && saveCurrentFile()==QMessageBox::Cancel) return; if (currentDoc) delete currentDoc; - currentDoc = new DocLnk(); + currentDoc = new DocLnk( lnkDoc ); listSheets.clear(); comboSheets->clear(); documentOpen(lnkDoc); documentModified=FALSE; } void MainWindow::selectorShow() { sheet->hide(); setCentralWidget(fileSelector); fileSelector->show(); fileSelector->reread(); } void MainWindow::selectorHide() { fileSelector->hide(); setCentralWidget(sheet); sheet->show(); } void MainWindow::slotFileNew() { |