Changeset 1b744c76 in subsurface


Ignore:
Timestamp:
Mar 28, 2017, 1:31:45 PM (8 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
6bcc36f
Parents:
d344779c
git-author:
Robert C. Helling <helling@…> (03/28/17 06:04:35)
git-committer:
Dirk Hohndel <dirk@…> (03/28/17 13:31:45)
Message:

Always show notes when replanning

... as per popular request. Plus adding const keyword to constant
strings.

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/planner.c

    rd344779c r1b744c76  
    539539        char *buffer = (char *)malloc(sz_buffer);
    540540        char *temp = (char *)malloc(sz_temp);
    541         char *deco, *segmentsymbol;
     541        const char *deco, *segmentsymbol;
    542542        static char buf[1000];
    543543        int len, lastdepth = 0, lasttime = 0, lastsetpoint = -1, newdepth = 0, lastprintdepth = 0, lastprintsetpoint = -1;
  • qt-models/diveplannermodel.cpp

    reefa390 r1b744c76  
    874874
    875875        //TODO: C-based function here?
    876         bool did_deco = plan(&diveplan, &cache, isPlanner(), true);
     876        plan(&diveplan, &cache, isPlanner(), true);
    877877        free(cache);
    878878        if (!current_dive || displayed_dive.id != current_dive->id) {
     
    897897                        if (oldnotes.indexOf(QString(disclaimer).left(40)) >= 0)
    898898                                oldnotes.truncate(oldnotes.indexOf(QString(displayed_dive.notes).left(40)));
    899                         if (did_deco)
    900                                 oldnotes.append(displayed_dive.notes);
     899                        oldnotes.append(displayed_dive.notes);
    901900                        displayed_dive.notes = strdup(oldnotes.toUtf8().data());
    902901                }
Note: See TracChangeset for help on using the changeset viewer.