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();
|
QListWidgetItem *item = fileList->currentItem();
|
||||||
if (item) {
|
if (item) {
|
||||||
VFile *fileToClose = NULL;
|
VFile *fileToClose = NULL;
|
||||||
if (!(p_event->modifiers() & Qt::ControlModifier)
|
|
||||||
&& g_config->getSingleClickClosePreviousTab()) {
|
|
||||||
VFile *file = getVFile(item);
|
VFile *file = getVFile(item);
|
||||||
Q_ASSERT(file);
|
Q_ASSERT(file);
|
||||||
|
if (p_event->modifiers() == Qt::NoModifier
|
||||||
|
&& g_config->getSingleClickClosePreviousTab()
|
||||||
|
&& file->getDocType() != DocType::Unknown) {
|
||||||
if (!editArea->isFileOpened(file)) {
|
if (!editArea->isFileOpened(file)) {
|
||||||
VEditTab *tab = editArea->getCurrentTab();
|
VEditTab *tab = editArea->getCurrentTab();
|
||||||
if (tab) {
|
if (tab) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user