This commit is contained in:
Herwig Birke
2018-05-16 10:33:56 +02:00
parent 7c507182ab
commit e89d236efd
+6 -9
View File
@@ -1193,14 +1193,6 @@ void cMainWindow::onRechercheContextMenu(const QPoint& pos)
void cMainWindow::onFileNew()
{
// QString szPath = QDir::homePath() + QDir::separator() + "OneDrive - WINDESIGN" + QDir::separator() + "__BOOKS__" + QDir::separator() + "qtStoryWriter" + QDir::separator() + "rückwärts.storyWriter" ;
// m_lpStoryBook = new cStoryBook(szPath);
// m_lpStoryBook->fillOutlineList(ui->m_lpOutlineList);
// m_lpStoryBook->fillCharacterList(ui->m_lpCharacterList);
// m_lpStoryBook->fillPlaceList(ui->m_lpPlaceList);
// m_lpStoryBook->fillObjectList(ui->m_lpObjectList);
// m_lpStoryBook->fillRechercheList(ui->m_lpRechercheList);
if(m_bSomethingChanged)
{
switch(QMessageBox::question(this, tr("Save"), m_lpStoryBook->title() + tr(" has been changed.\nDo you want to save?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel))
@@ -1218,6 +1210,8 @@ void cMainWindow::onFileNew()
}
}
ui->m_lpMdiArea->closeAllSubWindows();
if(m_lpStoryBook)
delete m_lpStoryBook;
@@ -1258,7 +1252,10 @@ void cMainWindow::onFileOpen()
if(szProjectName.isEmpty())
return;
delete m_lpStoryBook;
ui->m_lpMdiArea->closeAllSubWindows();
if(m_lpStoryBook)
delete m_lpStoryBook;
m_lpStoryBook = new cStoryBook(szProjectName);