mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Make background calculation optional
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
a9703628c4
commit
1e678d52b2
1 changed files with 6 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
|||
#include <QtConcurrent>
|
||||
#include <desktop-widgets/mainwindow.h>
|
||||
|
||||
#define VARIATIONS_IN_BACKGROUND 1
|
||||
|
||||
#define UNIT_FACTOR ((prefs.units.length == units::METERS) ? 1000.0 / 60.0 : feet_to_mm(1.0) / 60.0)
|
||||
|
||||
/* TODO: Port this to CleanerTableModel to remove a bit of boilerplate and
|
||||
|
@ -930,7 +932,11 @@ void DivePlannerPointsModel::createTemporaryPlan()
|
|||
lock_planner();
|
||||
cloneDiveplan(&diveplan, plan_copy);
|
||||
unlock_planner();
|
||||
#ifdef VARIATIONS_IN_BACKGROUND
|
||||
QtConcurrent::run(this, &DivePlannerPointsModel::computeVariations, plan_copy, &plan_deco_state);
|
||||
#else
|
||||
computeVariations(plan_copy, &plan_deco_state);
|
||||
#endif
|
||||
final_deco_state = plan_deco_state;
|
||||
emit calculatedPlanNotes();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue