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)
|
void ProfileGraphicsView::plot(struct dive *d)
|
||||||
{
|
{
|
||||||
scene()->clear();
|
|
||||||
|
|
||||||
|
scene()->clear();
|
||||||
if (dive != d){
|
if (dive != d){
|
||||||
resetTransform();
|
resetTransform();
|
||||||
zoomLevel = 0;
|
zoomLevel = 0;
|
||||||
dive = d;
|
dive = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isVisible()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!dive)
|
if(!dive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ protected:
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
void mouseMoveEvent(QMouseEvent* event);
|
void mouseMoveEvent(QMouseEvent* event);
|
||||||
void wheelEvent(QWheelEvent* event);
|
void wheelEvent(QWheelEvent* event);
|
||||||
|
void showEvent(QShowEvent* event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void plot_depth_profile();
|
void plot_depth_profile();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue