diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-14 21:45:39 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-20 14:45:08 +0900 |
commit | 97419a0d6a3617559d8bb05fc582a3ba7262649e (patch) | |
tree | 2bf4d77c5181fdd2a43b05438eda3210ee58fa6e /qt-ui | |
parent | 4bc3687b21e75839f89b8daa284a29aa31dd6673 (diff) | |
download | subsurface-97419a0d6a3617559d8bb05fc582a3ba7262649e.tar.gz |
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>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 3d55a32ec..473f62d27 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -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(); } - item->hide(); - replot(); } } |