Skip to content

Commit

Permalink
fix: if close the tab, delete the blank file.
Browse files Browse the repository at this point in the history
Change-Id: I8422168ca12eca212d17ceacf94301875e477695
  • Loading branch information
rekols committed Aug 25, 2018
1 parent 3368753 commit 67f0ab1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions editor/src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,17 @@ void Window::closeTab()

dialog->exec();
} else {
// Record last close path.
// record last close path.
m_closeFileHistory << m_tabbar->getActiveTabPath();

// Close tab directly, because all file is save automatically.
// close tab directly, because all file is save automatically.
m_tabbar->closeActiveTab();

// remove blank file.
if (isBlankFile) {
QFile::remove(filePath);
}

handleCloseFile(filePath);
focusActiveEditor();
}
Expand Down

0 comments on commit 67f0ab1

Please sign in to comment.