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


Ignore:
Timestamp:
02/26/18 09:36:16 (6 years ago)
Author:
Sanahuja Guillaume
Message:

allows realloc in graphs

File:
1 edited

Legend:

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

    r15 r222  
    104104  step_s = period / 1000.;
    105105  plot(datas);
     106  free(datas);
    106107}
    107108
     
    110111  if (event->button() == Qt::RightButton) {
    111112    QMenu *menu = new QMenu("nom", (QwtPlot *)this);
    112     QAction *a, *b, *z;
     113    QAction *resetX, *resetY, *clear,*action;
    113114
    114     a = menu->addAction("reset time view");
    115     b = menu->addAction("reset y view");
     115    resetX = menu->addAction("reset time view");
     116    resetY = menu->addAction("reset y view");
    116117    menu->addSeparator();
    117118
    118119    appendmenu(menu);
    119     z = execmenu((QwtPlot *)this, menu, event->globalPos());
     120   
     121    menu->addSeparator();
     122    clear = menu->addAction("clear graph");
     123   
     124    action = execmenu((QwtPlot *)this, menu, event->globalPos());
    120125    delete menu;
    121126
    122     if (z == a)
     127    if (action == resetX)
    123128      resetXView();
    124     if (z == b)
     129    if (action == resetY)
    125130      resetYView();
     131     
     132    if (action == clear)
     133      clearCurves();
    126134
    127135    return true;
Note: See TracChangeset for help on using the changeset viewer.