Planner: show the plan notes in the new widget

That was easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-05-31 21:14:44 -07:00
parent e93bf1e559
commit 6333f3aa35
3 changed files with 7 additions and 0 deletions

View file

@ -842,6 +842,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
#endif #endif
if (plannerModel->recalcQ() && !diveplan_empty(&diveplan)) { if (plannerModel->recalcQ() && !diveplan_empty(&diveplan)) {
plan(&diveplan, &cache, &tempDive, stagingDive, isPlanner()); plan(&diveplan, &cache, &tempDive, stagingDive, isPlanner());
MainWindow::instance()->setPlanNotes(tempDive->notes);
addDecoToModel(); addDecoToModel();
if (mode == ADD || mode == PLAN) { if (mode == ADD || mode == PLAN) {
// copy the samples and events, but don't overwrite the cylinders // copy the samples and events, but don't overwrite the cylinders

View file

@ -415,6 +415,11 @@ void MainWindow::planCreated()
refreshDisplay(); refreshDisplay();
} }
void MainWindow::setPlanNotes(const char *notes)
{
ui.divePlanOutput->setText(notes);
}
void MainWindow::on_actionDivePlanner_triggered() void MainWindow::on_actionDivePlanner_triggered()
{ {
if(!plannerStateClean()) if(!plannerStateClean())

View file

@ -77,6 +77,7 @@ public:
ProfileWidget2 *graphics() const; ProfileWidget2 *graphics() const;
void setLoadedWithFiles(bool filesFromCommandLine); void setLoadedWithFiles(bool filesFromCommandLine);
bool filesFromCommandLine() const; bool filesFromCommandLine() const;
void setPlanNotes(const char *notes);
private private
slots: slots:
/* file menu action */ /* file menu action */