summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-09-09 22:49:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-12 14:17:55 -0700
commit31f1af07c23ef5c47dff1b88b5e70e75b95ce2ad (patch)
tree9168c98da1edd8a7238591f1ff0a101d23d4a7fd /desktop-widgets
parentecbfea35680fe9f00ccacb89675b2109470b5125 (diff)
downloadsubsurface-31f1af07c23ef5c47dff1b88b5e70e75b95ce2ad.tar.gz
Planner: fix display of "overlapping dives" message
1) Add a missing <div> 2) More importantly: recognize html content via <div>-tags instead of <table>-tags. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index cb186db02..7112458f1 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -433,7 +433,7 @@ void MainTab::updateDiveInfo(bool clear)
ui.notes->setText(QString());
if (!clear) {
QString tmp(displayed_dive.notes);
- if (tmp.indexOf("<table") != -1) {
+ if (tmp.indexOf("<div") != -1) {
tmp.replace(QString("\n"), QString("<br>"));
ui.notes->setHtml(tmp);
} else {
@@ -1427,7 +1427,7 @@ void MainTab::on_notes_textChanged()
if (same_string(displayed_dive.notes, qPrintable(ui.notes->toPlainText())))
return;
free(displayed_dive.notes);
- if (ui.notes->toHtml().indexOf("<table") != -1)
+ if (ui.notes->toHtml().indexOf("<div") != -1)
displayed_dive.notes = copy_qstring(ui.notes->toHtml());
else
displayed_dive.notes = copy_qstring(ui.notes->toPlainText());
@@ -1512,7 +1512,7 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
SHOW_SELECTIVE(suit);
if (what.notes) {
QString tmp(displayed_dive.notes);
- if (tmp.contains("<table")) {
+ if (tmp.contains("<div")) {
tmp.replace(QString("\n"), QString("<br>"));
ui.notes->setHtml(tmp);
} else {