Skip to content

Commit

Permalink
Fix #263 close does not completely forget project filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jun 17, 2016
1 parent 5aa4273 commit 4a0e183
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ void MainWindow::setCurrentFile(const QString &filename)
{
QString shownName = "Untitled";
if (filename == untitledFileName())
m_currentFile = "";
m_currentFile.clear();
else
m_currentFile = filename;
if (!m_currentFile.isEmpty())
Expand Down Expand Up @@ -2101,6 +2101,8 @@ void MainWindow::onPlaylistClosed()
setWindowModified(false);
m_undoStack->clear();
MLT.resetURL();
delete m_autosaveFile;
m_autosaveFile = new AutoSaveFile(untitledFileName());
if (!multitrack())
m_player->enableTab(Player::ProjectTabIndex, false);
}
Expand All @@ -2127,6 +2129,8 @@ void MainWindow::onMultitrackClosed()
setWindowModified(false);
m_undoStack->clear();
MLT.resetURL();
delete m_autosaveFile;
m_autosaveFile = new AutoSaveFile(untitledFileName());
if (!playlist() || playlist()->count() == 0)
m_player->enableTab(Player::ProjectTabIndex, false);
}
Expand Down

0 comments on commit 4a0e183

Please sign in to comment.