Do not set maxTime when the handler is moving.

Fixes massive cpu hog.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-26 17:51:46 -03:00 committed by Dirk Hohndel
parent fe2eb1a9fc
commit addec6b69f
2 changed files with 24 additions and 3 deletions

View file

@ -108,7 +108,8 @@ protected:
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void contextMenuEvent(QContextMenuEvent *event);
virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
private: /*methods*/
void fixBackgroundPos();
void scrollViewTo(const QPoint &pos);
@ -160,6 +161,8 @@ private:
int fixHandlerIndex(DiveHandler *activeHandler);
friend class DiveHandler;
QHash<Qt::Key, QAction *> actionsForKeys;
bool shouldCalculateMaxTime;
int maxtime;
};
#endif // PROFILEWIDGET2_H