mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
New profile: Toggle on / off the ruler via settings.
This patch toggles on / off the ruler via QSettings. When the user clicks on the toolbar, this sets the settings to true / false, in a way that if the user turns Subsurface on/ off, we still get the last choosed option. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
35e102b176
commit
c356fac3b6
1 changed files with 6 additions and 1 deletions
|
@ -433,6 +433,11 @@ void ProfileWidget2::settingsChanged()
|
|||
dataModel->clear();
|
||||
plotDives(QList<dive*>() << getDiveById(diveId));
|
||||
}
|
||||
|
||||
bool rulerVisible = s.value("rulergraph", false).toBool();
|
||||
rulerItem->setVisible(rulerVisible);
|
||||
rulerItem->destNode()->setVisible(rulerVisible );
|
||||
rulerItem->sourceNode()->setVisible(rulerVisible );
|
||||
}
|
||||
|
||||
void ProfileWidget2::resizeEvent(QResizeEvent* event)
|
||||
|
@ -591,7 +596,7 @@ void ProfileWidget2::setProfileState()
|
|||
}
|
||||
}
|
||||
|
||||
bool rulerVisible = s.value("rulervisible", false).toBool();
|
||||
bool rulerVisible = s.value("rulergraph", false).toBool();
|
||||
rulerItem->setVisible(rulerVisible);
|
||||
rulerItem->destNode()->setVisible(rulerVisible );
|
||||
rulerItem->sourceNode()->setVisible(rulerVisible );
|
||||
|
|
Loading…
Reference in a new issue