mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
MdTab: fix bug which will open two tabs for the same file
This commit is contained in:
parent
357604a38d
commit
e0ba7210f3
@ -94,11 +94,13 @@ VMdTab::VMdTab(VFile *p_file, VEditArea *p_editArea,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QTimer::singleShot(50, this, [this, p_mode]() {
|
||||||
if (p_mode == OpenFileMode::Edit) {
|
if (p_mode == OpenFileMode::Edit) {
|
||||||
showFileEditMode();
|
showFileEditMode();
|
||||||
} else {
|
} else {
|
||||||
showFileReadMode();
|
showFileReadMode();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void VMdTab::setupUI()
|
void VMdTab::setupUI()
|
||||||
@ -940,7 +942,7 @@ void VMdTab::focusChild()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
this->setFocus();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user