Changeset eefa390 in subsurface for qt-models


Ignore:
Timestamp:
Mar 28, 2017, 1:31:45 PM (7 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
d344779c
Parents:
622ab22
git-author:
Robert C. Helling <helling@…> (03/27/17 09:30:05)
git-committer:
Dirk Hohndel <dirk@…> (03/28/17 13:31:45)
Message:

Handle notes in replan

Upon replanning a dive, we want to delete the old
dive plan in the notes and replace it with the actual.

This fixes a problem when we failed to detect the old plan due
to the deco model name appearing in the disclaimer that was used
as a marker for the notes.

This patch also adds translation markers for the deco model name strings..

Fixes #285

Signed-off-by: Robert C. Helling <helling@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-models/diveplannermodel.cpp

    r8834fc0 reefa390  
    895895                        record_dive(copy);
    896896                        QString oldnotes(current_dive->notes);
    897                         if (oldnotes.indexOf(QString(disclaimer)) >= 0)
    898                                 oldnotes.truncate(oldnotes.indexOf(QString(disclaimer)));
     897                        if (oldnotes.indexOf(QString(disclaimer).left(40)) >= 0)
     898                                oldnotes.truncate(oldnotes.indexOf(QString(displayed_dive.notes).left(40)));
    899899                        if (did_deco)
    900900                                oldnotes.append(displayed_dive.notes);
Note: See TracChangeset for help on using the changeset viewer.