##// END OF EJS Templates
Updates displayVariable() method
Alexandre Leroux -
r202:7ea43466f4ed
parent child
Show More
@@ -100,16 +100,7 QString VisualizationWidget::name() const
100 100 void VisualizationWidget::displayVariable(std::shared_ptr<Variable> variable) noexcept
101 101 {
102 102 if (auto currentTab = dynamic_cast<VisualizationTabWidget *>(ui->tabWidget->currentWidget())) {
103 if (auto newZone = currentTab->createZone()) {
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 {
103 if (!currentTab->createZone(variable)) {
113 104 qCCritical(LOG_VisualizationWidget())
114 105 << tr("Can't display the variable : can't create a new zone in the current tab");
115 106 }
General Comments 0
You need to be logged in to leave comments. Login now