From 14b117d74a9953ce415279eeb8debacd1bcd912f Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 10 Jan 2019 21:16:01 +0100 Subject: Save rich text of notes tab across restart. --- src/modinfodialog.cpp | 6 +++++- src/modinfodialog.ui | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index c8e0fb9e..4201b708 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -193,7 +193,11 @@ ModInfoDialog::ModInfoDialog(ModInfo::Ptr modInfo, const DirectoryEntry *directo ModInfoDialog::~ModInfoDialog() { m_ModInfo->setComments(ui->commentsEdit->text()); - m_ModInfo->setNotes(ui->notesEdit->toPlainText()); + //avoid saving html stump if notes filed is empty + if (ui->notesEdit->toPlainText().isEmpty()) + m_ModInfo->setNotes(ui->notesEdit->toPlainText()); + else + m_ModInfo->setNotes(ui->notesEdit->toHtml()); saveCategories(ui->categoriesTree->invisibleRootItem()); saveIniTweaks(); // ini tweaks are written to the ini file directly. This is the only information not managed by ModInfo delete ui->descriptionView->page(); diff --git a/src/modinfodialog.ui b/src/modinfodialog.ui index 736214f4..1f8b0029 100644 --- a/src/modinfodialog.ui +++ b/src/modinfodialog.ui @@ -802,6 +802,9 @@ p, li { white-space: pre-wrap; } Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column. + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column. -- cgit v1.3.1