summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl <gabriel.cortesi@outlook.com>2019-01-10 21:16:01 +0100
committerAl <gabriel.cortesi@outlook.com>2019-01-10 21:16:01 +0100
commit14b117d74a9953ce415279eeb8debacd1bcd912f (patch)
tree25b12142c328dbfc2facc49c705221206a002e59 /src
parent301c1156f848d2cc854aef9fa6c5d52db8c510e9 (diff)
Save rich text of notes tab across restart.
Diffstat (limited to 'src')
-rw-r--r--src/modinfodialog.cpp6
-rw-r--r--src/modinfodialog.ui3
2 files changed, 8 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();
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; }
<property name="whatsThis">
<string>Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column.</string>
</property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
<property name="placeholderText">
<string>Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column.</string>
</property>