diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-10 21:16:01 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-01-10 21:16:01 +0100 |
| commit | 14b117d74a9953ce415279eeb8debacd1bcd912f (patch) | |
| tree | 25b12142c328dbfc2facc49c705221206a002e59 /src/modinfodialog.cpp | |
| parent | 301c1156f848d2cc854aef9fa6c5d52db8c510e9 (diff) | |
Save rich text of notes tab across restart.
Diffstat (limited to 'src/modinfodialog.cpp')
| -rw-r--r-- | src/modinfodialog.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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();
|
