Skip to content

Commit

Permalink
SimulationExperiment view: make sure that our graph panels are proper…
Browse files Browse the repository at this point in the history
…ly reinitialised when reloading a SED-ML file (#1426).
  • Loading branch information
agarny committed Nov 14, 2017
1 parent 8082eff commit d788feb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Expand Up @@ -765,6 +765,16 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::setGraphPanel

//==============================================================================

void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::reinitialize(GraphPanelWidget::GraphPanelWidget *pGraphPanel)
{
// Reinitialise ourselves

finalize(pGraphPanel);
initialize(pGraphPanel);
}

//==============================================================================

void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::showGraphPanelContextMenu(const QPoint &pPosition) const
{
Q_UNUSED(pPosition);
Expand Down
Expand Up @@ -106,6 +106,8 @@ class SimulationExperimentViewInformationGraphPanelAndGraphsWidget : public QSta

void setGraphPanelSectionExpanded(const int &pSection, const bool &pExpanded);

void reinitialize(GraphPanelWidget::GraphPanelWidget *pGraphPanel);

private:
Mode mMode;

Expand Down
Expand Up @@ -2454,11 +2454,13 @@ bool SimulationExperimentViewSimulationWidget::furtherInitialize()

libsedml::SedPlot2D *sedmlPlot2d = static_cast<libsedml::SedPlot2D *>(sedmlDocument->getOutput(i));
GraphPanelWidget::GraphPanelWidget *graphPanel = graphPanelsWidget->graphPanels()[i];
SimulationExperimentViewInformationGraphPanelAndGraphsWidget *graphPanelAndGraphsWidget = mContentsWidget->informationWidget()->graphPanelAndGraphsWidget();

graphPanelAndGraphsWidget->reinitialize(graphPanel);

annotation = sedmlPlot2d->getAnnotation();

if (annotation) {
SimulationExperimentViewInformationGraphPanelAndGraphsWidget *graphPanelAndGraphsWidget = mContentsWidget->informationWidget()->graphPanelAndGraphsWidget();
Core::Properties graphPanelProperties = graphPanelAndGraphsWidget->graphPanelProperties(graphPanel);

for (uint i = 0, iMax = annotation->getNumChildren(); i < iMax; ++i) {
Expand Down

0 comments on commit d788feb

Please sign in to comment.