##// END OF EJS Templates
Closes all graphs of the selected zone in graph mode
trabillard -
r1307:47a361805173
parent child
Show More
@@ -68,6 +68,9 public:
68 68 /// Returns the first graph in the zone or nullptr if there is no graph inside
69 69 VisualizationGraphWidget *firstGraph() const;
70 70
71 /// Closes all graphes inside the zone
72 void closeAllGraphs();
73
71 74 // IVisualizationWidget interface
72 75 void accept(IVisualizationWidgetVisitor *visitor) override;
73 76 bool canDrop(const Variable &variable) const override;
@@ -259,7 +259,7 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
259 259 return;
260 260 }
261 261
262 // Close the previous graph and delete the asociated variables
262 // Closes the previous graph and delete the asociated variables
263 263 for (auto graph : m_CustomGraphs) {
264 264 graph->close();
265 265 auto variables = graph->variables().toVector();
@@ -270,6 +270,9 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
270 270 }
271 271 m_CustomGraphs.clear();
272 272
273 // Closes the remaining graphs inside the zone
274 zone->closeAllGraphs();
275
273 276 // Calculates the range of each graph which will be created
274 277 auto graphRange = getGraphRanges(event);
275 278
@@ -336,6 +336,12 VisualizationGraphWidget *VisualizationZoneWidget::firstGraph() const
336 336 return firstGraph;
337 337 }
338 338
339 void VisualizationZoneWidget::closeAllGraphs()
340 {
341 processGraphs(*ui->dragDropContainer->layout(),
342 [](VisualizationGraphWidget &graphWidget) { graphWidget.close(); });
343 }
344
339 345 void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor)
340 346 {
341 347 if (visitor) {
General Comments 0
You need to be logged in to leave comments. Login now