@@ -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 ( |
|
103 | if (!currentTab->createZone(variable)) { | |
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 0
You need to be logged in to leave comments.
Login now