mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix bug where dives are shown twice
On the QML page, dives are repeated. Adding process_dives to QMLManager after calling parse_file solves this. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ee9452ae8a
commit
e4e6e896c1
2 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,7 @@ ApplicationWindow {
|
||||||
contentHeight: detailsView.height
|
contentHeight: detailsView.height
|
||||||
clip: true
|
clip: true
|
||||||
Row {
|
Row {
|
||||||
Text { text: 'Notes: ' + notes; wrapMode: Text.WordWrap; width: details.width }
|
Text { text: '<b>Notes:</b><br/>' + notes; wrapMode: Text.WordWrap; width: details.width }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#include "qmlmanager.h"
|
#include "qmlmanager.h"
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include "../qt-models/divelistmodel.h"
|
#include "qt-models/divelistmodel.h"
|
||||||
|
#include "divelist.h"
|
||||||
|
|
||||||
QMLManager::QMLManager()
|
QMLManager::QMLManager()
|
||||||
{
|
{
|
||||||
|
@ -21,7 +22,6 @@ void QMLManager::setFilename(const QString &f)
|
||||||
{
|
{
|
||||||
m_fileName = f;
|
m_fileName = f;
|
||||||
loadFile();
|
loadFile();
|
||||||
emit filenameChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLManager::loadFile()
|
void QMLManager::loadFile()
|
||||||
|
@ -30,7 +30,7 @@ void QMLManager::loadFile()
|
||||||
QString strippedFileName = url.toLocalFile();
|
QString strippedFileName = url.toLocalFile();
|
||||||
|
|
||||||
parse_file(strippedFileName.toUtf8().data());
|
parse_file(strippedFileName.toUtf8().data());
|
||||||
|
process_dives(false, false);
|
||||||
int i;
|
int i;
|
||||||
struct dive *d;
|
struct dive *d;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue