mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 03:53:24 +00:00
Fixed the loading of some maps
On some maps, the lack of setting up the dc before plotting the dive-computer nick caused a division by zero, breaking the correct visualization of the dive. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
30297ebd4b
commit
e3cb36498d
1 changed files with 3 additions and 0 deletions
|
@ -312,6 +312,9 @@ void ProfileGraphicsView::plot(struct dive *d)
|
|||
if (nick.isEmpty())
|
||||
nick = tr("unknown divecomputer");
|
||||
|
||||
gc.leftx = 0; gc.rightx = 1.0;
|
||||
gc.topy = 0; gc.bottomy = 1.0;
|
||||
|
||||
text_render_options_t computer = {DC_TEXT_SIZE, TIME_TEXT, LEFT, MIDDLE};
|
||||
diveComputer = plot_text(&computer, QPointF(gc.leftx, gc.bottomy), nick);
|
||||
// The Time ruler should be right after the DiveComputer:
|
||||
|
|
Loading…
Add table
Reference in a new issue