Changeset 436 in flair-src for trunk/tools/FlairGCS/src/DataPlot1D.cpp


Ignore:
Timestamp:
08/24/21 11:58:44 (5 months ago)
Author:
Sanahuja Guillaume
Message:

gcs:sync graphs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/DataPlot1D.cpp

    r269 r436  
    44// %flair:license}
    55#include "DataPlot1D.h"
     6#include "ConnectionLayout.h"
    67#include "Layout.h"
    78#include <QMouseEvent>
    89#include <QMenu>
    910#include <QGridLayout>
     11#include <QTime>
    1012#include <qendian.h>
    1113
     
    1618
    1719  setEnabled(enabled);
     20  ResetElapsedTime((float)connectionLayout()->GetStartTime().msecsTo(QTime::currentTime())/1000.);
    1821  parent->addWidget(this, row, col);
    1922  visible_widget = this;
     
    2528
    2629void DataPlot1D::XmlEvent(QDomElement *dom) {
     30  bool previouslyEnabled=IsEnabled();
     31 
    2732  if (dom->attribute("curve") != "") {
    2833    QString type = dom->attribute("type");
     
    4651    XmlSetup(dom);
    4752  }
     53 
     54    if(previouslyEnabled!=IsEnabled() && IsEnabled())
     55        ResetElapsedTime((float)connectionLayout()->GetStartTime().msecsTo(QTime::currentTime())/1000.);
    4856}
    4957
     
    132140    if (action == clear)
    133141      clearCurves();
    134 
     142       
    135143    return true;
    136144  }
Note: See TracChangeset for help on using the changeset viewer.