mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 21:53:23 +00:00
Speed Improvement: hide events instead of replotting everything
The 'Hide Similar Events' function asked the Profile to replot eveything, only because some events were hidden from the interface. Instead of that we can simply hide the events since the graph will be the same. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4bc3687b21
commit
97419a0d6a
1 changed files with 7 additions and 3 deletions
|
@ -796,14 +796,18 @@ void ProfileWidget2::hideEvents()
|
|||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
|
||||
if (event->name) {
|
||||
for (int i = 0; i < evn_used; i++) {
|
||||
if (!strcmp(event->name, ev_namelist[i].ev_name)) {
|
||||
if (same_string(event->name, ev_namelist[i].ev_name)) {
|
||||
ev_namelist[i].plot_ev = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Q_FOREACH (DiveEventItem *evItem, eventItems) {
|
||||
if(same_string(evItem->getEvent()->name, event->name))
|
||||
evItem->hide();
|
||||
}
|
||||
} else {
|
||||
item->hide();
|
||||
replot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue