mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
a3d8191896
The ItemPos structure describes the position of various chart elements on the scene. It had two problems: - The identifiers were starting with an underscore followed by a capital letter. This is reserved to the compiler. - The global object was initialized in the ProfileWidget's constructor. This means that if there are multiple ProfileWidgets, the structure is reinitialized even though it is constant. Remove the underscores (what was the point anyway?) and initialize the structure in its own constructor. Moreover, make the object const to drive the point home. If this ever needs to be variable, each ProfileWidget should get its own copy of the object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
animationfunctions.cpp | ||
animationfunctions.h | ||
CMakeLists.txt | ||
divecartesianaxis.cpp | ||
divecartesianaxis.h | ||
diveeventitem.cpp | ||
diveeventitem.h | ||
divehandler.cpp | ||
divehandler.h | ||
divelineitem.cpp | ||
divelineitem.h | ||
divepixmapitem.cpp | ||
divepixmapitem.h | ||
diveprofileitem.cpp | ||
diveprofileitem.h | ||
diverectitem.cpp | ||
diverectitem.h | ||
divetextitem.cpp | ||
divetextitem.h | ||
divetooltipitem.cpp | ||
divetooltipitem.h | ||
profilewidget2.cpp | ||
profilewidget2.h | ||
qmlprofile.cpp | ||
qmlprofile.h | ||
ruleritem.cpp | ||
ruleritem.h | ||
tankitem.cpp | ||
tankitem.h |