Ignore:
Timestamp:
Sep 2, 2016, 8:34:21 AM (8 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Gui_Fixes
Parents:
2eeb21
git-author:
Frederik Heber <heber@…> (09/02/16 08:34:18)
git-committer:
Frederik Heber <heber@…> (09/02/16 08:34:21)
Message:

FIX: Skipping empty curves in QtHomologyList::refill().

  • this does not solve the whole problem. For a large molecule, we have many different graphs to the same "morse_61" potential, which appears then frequently in the plot list ... BUT each shows the data of the first/last plot curve as they are distinguished by name.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/QtHomologyList.cpp

    r2eeb21 rf62b00  
    266266        }
    267267
    268         QSeisData data(xvalues, yvalues, QString(potentialname.c_str()));
    269         // couple to QSeisPlotCurve and register the curve
    270         QSeisPlotCurve *curve = new QSeisPlotCurve(QString(potentialname.c_str()), "energy");
    271         curve->updateCurve(&data);
    272         if (!QSeisCurveRegistry::getInstance().isPresentByName(curve->getName()))
    273           QSeisCurveRegistry::getInstance().registerInstance(curve);
    274         else
    275           delete curve;
    276         // couple to QSeisPlotPage
    277         widget->addCurve(potentialname);
    278 
     268        if ((!xvalues.empty()) && (!yvalues.empty())) {
     269          QSeisData data(xvalues, yvalues, QString(potentialname.c_str()));
     270          // couple to QSeisPlotCurve and register the curve
     271          QSeisPlotCurve *curve = new QSeisPlotCurve(QString(potentialname.c_str()), "energy");
     272          curve->updateCurve(&data);
     273          if (!QSeisCurveRegistry::getInstance().isPresentByName(curve->getName()))
     274            QSeisCurveRegistry::getInstance().registerInstance(curve);
     275          else
     276            delete curve;
     277          // couple to QSeisPlotPage
     278          widget->addCurve(potentialname);
     279        }
    279280      }
    280281    }
Note: See TracChangeset for help on using the changeset viewer.