Less event processing in HomeWindow

.. was trapping too many events, even when not visible

.. also went back to multishot timer for unreveal but
   stop it when the unreveal even happens.
This commit is contained in:
Mark Liversedge
2014-03-21 07:15:45 +00:00
parent 493f22acec
commit 3dae0a2fe3
2 changed files with 8 additions and 5 deletions

View File

@@ -821,13 +821,14 @@ GcChartWindow:: reveal()
void GcChartWindow:: unreveal()
{
_unrevealAnim->start();
_unrevealTimer->setSingleShot(150);
//_unrevealTimer->start(150);
//_unrevealTimer->setSingleShot(150);
_unrevealTimer->start(150);
}
void GcChartWindow:: hideRevealControls()
{
_revealControls->hide();
_unrevealTimer->stop();
}
void GcChartWindow:: saveImage()

View File

@@ -230,7 +230,7 @@ void
HomeWindow::rideSelected()
{
// we need to notify of null rides immediately
if (!myRideItem || amVisible()) {
if (!myRideItem || isVisible()) {
for (int i=0; i < charts.count(); i++) {
// show if its not a tab
@@ -250,7 +250,7 @@ HomeWindow::rideSelected()
void
HomeWindow::dateRangeChanged(DateRange dr)
{ Q_UNUSED( dr )
if (amVisible()) {
if (isVisible()) {
for (int i=0; i < charts.count(); i++) {
@@ -720,7 +720,7 @@ HomeWindow::resizeEvent(QResizeEvent * /* e */)
bool
HomeWindow::eventFilter(QObject *object, QEvent *e)
{
if (isHidden()) return false; // ignore when we aren't visible
if (!isVisible()) return false; // ignore when we aren't visible
// mouse moved and tabbed -- should we show/hide chart popup controls?
if (e->type() == QEvent::MouseMove && currentStyle == 0 && tabbed->currentIndex() >= 0) {
@@ -756,6 +756,8 @@ HomeWindow::eventFilter(QObject *object, QEvent *e)
}
}
//qDebug()<<QTime::currentTime()<<name<<"filter event"<<object<<e->type();
// we watch the mouse when
// dropping charts, to update
// the cursor position