mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Turn of replotting while the cylinder type combo box is active
Since replotting is expensive and it is triggered while scrolling through the list of cylinders, better not do it for improved user experience and replot only after the combo box loses focus. I hope this... Fixes #768 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
98085e25e5
commit
b72c32da7d
4 changed files with 23 additions and 0 deletions
|
@ -289,10 +289,14 @@ void ProfileWidget2::setupItemOnScene()
|
|||
heartBeatAxis->setLinesVisible(true);
|
||||
percentageAxis->setTextVisible(true);
|
||||
percentageAxis->setLinesVisible(true);
|
||||
|
||||
replotEnabled = true;
|
||||
}
|
||||
|
||||
void ProfileWidget2::replot()
|
||||
{
|
||||
if (!replotEnabled)
|
||||
return;
|
||||
dataModel->clear();
|
||||
plotDive(0, true); // simply plot the displayed_dive again
|
||||
}
|
||||
|
@ -1089,6 +1093,11 @@ struct plot_data *ProfileWidget2::getEntryFromPos(QPointF pos)
|
|||
return entry;
|
||||
}
|
||||
|
||||
void ProfileWidget2::setReplot(bool state)
|
||||
{
|
||||
replotEnabled = state;
|
||||
}
|
||||
|
||||
void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
if (currentState == ADD || currentState == PLAN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue