aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-09 19:11:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-09 14:42:07 -0800
commit1d871eb749daaaeed7aec58c637450935f996932 (patch)
tree628bf76b83f7376d790f15ef1a21133062f62715 /qt-ui/profile
parent8bb5cd60122e3f85d08f21bb7b9e1b7ef11aacb0 (diff)
downloadsubsurface-1d871eb749daaaeed7aec58c637450935f996932.tar.gz
ProfileWidget2 class improvements
* Reorder ProfileWidget2 class constructor initialize list. * Initialize(lazy) ProfileWidget2::plotInfo structure. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp6
-rw-r--r--qt-ui/profile/profilewidget2.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 76c560fa6..0f38e5f1a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -63,10 +63,10 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
temperatureAxis(new TemperatureAxis()),
timeAxis(new TimeAxis()),
diveProfileItem(new DiveProfileItem()),
- cylinderPressureAxis(new DiveCartesianAxis()),
+ cartesianPlane(new DiveCartesianPlane()),
temperatureItem(new DiveTemperatureItem()),
+ cylinderPressureAxis(new DiveCartesianAxis()),
gasPressureItem(new DiveGasPressureItem()),
- cartesianPlane(new DiveCartesianPlane()),
meanDepth(new MeanDepthLine()),
diveComputerText(new DiveTextItem()),
diveCeiling(new DiveCalculatedCeiling()),
@@ -75,6 +75,8 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
pheGasItem( new PartialPressureGasItem()),
po2GasItem( new PartialPressureGasItem())
{
+ memset(&plotInfo, 0, sizeof(plotInfo));
+
setupSceneAndFlags();
setupItemSizes();
setupItemOnScene();
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index ebc45f48a..605d93f58 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -81,7 +81,7 @@ private:
// So it's esyer to replicate for more dives later.
// In the meantime, keep it here.
struct plot_info *plotInfo;
- DepthAxis *profileYAxis ;
+ DepthAxis *profileYAxis;
PartialGasPressureAxis *gasYAxis;
TemperatureAxis *temperatureAxis;
TimeAxis *timeAxis;