mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: pass section directly to tripTitle() and tripShortDate()
Instead of converting the section-heading string to a trip-pointer in QML and pass that to the tripTitle() and tripShortDate() functions, pass the string and convert in C++ code. Hopefully, this makes the code more robust. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ce751bd696
commit
9322c54b6a
3 changed files with 12 additions and 15 deletions
|
|
@ -353,8 +353,7 @@ Kirigami.ScrollablePage {
|
|||
}
|
||||
Controls.Label {
|
||||
text: {
|
||||
var trip = diveListView.model.tripIdToObject(section);
|
||||
diveListView.model.tripShortDate(trip);
|
||||
diveListView.model.tripShortDate(section)
|
||||
}
|
||||
color: subsurfaceTheme.primaryTextColor
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
|
|
@ -379,8 +378,7 @@ Kirigami.ScrollablePage {
|
|||
Controls.Label {
|
||||
id: sectionText
|
||||
text: {
|
||||
var trip = diveListView.model.tripIdToObject(section);
|
||||
diveListView.model.tripTitle(trip);
|
||||
diveListView.model.tripTitle(section)
|
||||
}
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
visible: text !== ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue