mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: enter press on an unknown file in file list should not close current tab
This commit is contained in:
parent
9718d1f727
commit
f130c3dd98
@ -984,10 +984,11 @@ void VFileList::keyPressEvent(QKeyEvent *p_event)
|
||||
QListWidgetItem *item = fileList->currentItem();
|
||||
if (item) {
|
||||
VFile *fileToClose = NULL;
|
||||
if (!(p_event->modifiers() & Qt::ControlModifier)
|
||||
&& g_config->getSingleClickClosePreviousTab()) {
|
||||
VFile *file = getVFile(item);
|
||||
Q_ASSERT(file);
|
||||
if (p_event->modifiers() == Qt::NoModifier
|
||||
&& g_config->getSingleClickClosePreviousTab()
|
||||
&& file->getDocType() != DocType::Unknown) {
|
||||
if (!editArea->isFileOpened(file)) {
|
||||
VEditTab *tab = editArea->getCurrentTab();
|
||||
if (tab) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user