small fix

- Outline viewer;
- Import legacy notebook;
This commit is contained in:
Le Tan 2020-12-14 21:32:38 +08:00
parent c95e850bb1
commit db3139e97d
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ void ImportLegacyNotebookDialog::acceptedButtonClicked()
QString(),
tr("Welcome to VNoteX and the new VNote!"),
this);
if (ret && importLegacyNotebook()) {
if (ret == QMessageBox::Ok && importLegacyNotebook()) {
accept();
return;
}

View File

@ -165,7 +165,6 @@ void OutlineViewer::showEvent(QShowEvent *p_event)
void OutlineViewer::updateOutline(const QSharedPointer<Outline> &p_outline)
{
m_muted = true;
if (!p_outline) {
if (m_outline.isEmpty()) {
return;
@ -178,6 +177,7 @@ void OutlineViewer::updateOutline(const QSharedPointer<Outline> &p_outline)
m_outline = *p_outline;
}
m_muted = true;
updateTreeToOutline(m_tree, m_outline);
expandTree(m_autoExpandedLevel);