mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do not plot on showEvent if dive is already plotted.
We do a force-plot on showEvent because the user can have asked to open a dive file via command line, so the app needs to open already with a profile plotted. if the user opens the program, loads a map, hides the profile by hitting ctrl + 1, then shows the profile again by hitting ctrl + 2, we do not want to do all the math to show the profile again, because we already have it in memory. this also fixes dirk's strange behavior of funky profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
ab0213f28e
commit
9993d49966
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ void ProfileGraphicsView::showEvent(QShowEvent* event)
|
|||
// but the dive was not ploted.
|
||||
// force a replot by modifying the dive
|
||||
// hold by the view, and issuing a plot.
|
||||
if (dive) {
|
||||
if (dive && !scene()->items().count()) {
|
||||
dive = 0;
|
||||
plot(get_dive(selected_dive));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue