mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed loading the first dive via command line on the profile.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
1fec7d849c
commit
56c4cced53
2 changed files with 12 additions and 1 deletions
|
@ -194,16 +194,26 @@ static void plot_set_scale(scale_mode_t scale)
|
|||
}
|
||||
}
|
||||
|
||||
void ProfileGraphicsView::showEvent(QShowEvent* event)
|
||||
{
|
||||
if (dive)
|
||||
plot(dive);
|
||||
}
|
||||
|
||||
void ProfileGraphicsView::plot(struct dive *d)
|
||||
{
|
||||
scene()->clear();
|
||||
|
||||
scene()->clear();
|
||||
if (dive != d){
|
||||
resetTransform();
|
||||
zoomLevel = 0;
|
||||
dive = d;
|
||||
}
|
||||
|
||||
if(!isVisible()){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!dive)
|
||||
return;
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ protected:
|
|||
void resizeEvent(QResizeEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent* event);
|
||||
void wheelEvent(QWheelEvent* event);
|
||||
void showEvent(QShowEvent* event);
|
||||
|
||||
private:
|
||||
void plot_depth_profile();
|
||||
|
|
Loading…
Add table
Reference in a new issue