##// END OF EJS Templates
Updates displayVariable() method
Alexandre Leroux -
r188:7ea43466f4ed
parent child
Show More
@@ -100,16 +100,7 QString VisualizationWidget::name() const
100 void VisualizationWidget::displayVariable(std::shared_ptr<Variable> variable) noexcept
100 void VisualizationWidget::displayVariable(std::shared_ptr<Variable> variable) noexcept
101 {
101 {
102 if (auto currentTab = dynamic_cast<VisualizationTabWidget *>(ui->tabWidget->currentWidget())) {
102 if (auto currentTab = dynamic_cast<VisualizationTabWidget *>(ui->tabWidget->currentWidget())) {
103 if (auto newZone = currentTab->createZone()) {
103 if (!currentTab->createZone(variable)) {
note

NOTE: That implies we cannot create zone without variable anymore

104 if (auto newGraph = newZone->createGraph()) {
105 newGraph->addVariable(variable);
106 }
107 else {
108 qCCritical(LOG_VisualizationWidget())
109 << tr("Can't display the variable : can't create the graph");
110 }
111 }
112 else {
113 qCCritical(LOG_VisualizationWidget())
104 qCCritical(LOG_VisualizationWidget())
114 << tr("Can't display the variable : can't create a new zone in the current tab");
105 << tr("Can't display the variable : can't create a new zone in the current tab");
115 }
106 }
General Comments 4
Under Review
author

Pull request updated. Auto status change to "Under Review"

Changed commits:
  * 1 added
  * 0 removed

Changed files:
  * M gui/include/Visualization/VisualizationGraphWidget.h
  * M gui/src/Visualization/VisualizationGraphWidget.cpp
Approved
author

Status change > Approved

You need to be logged in to leave comments. Login now