Commit ebf84712 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Remove toto and add delete

parent 0a5dbedb
......@@ -79,9 +79,8 @@ void Stats_window::init_window() {
void Stats_window::on_reload_button_clicked() {
std::string kind_of_diagram = _kind_of_diagram_box->currentText().toStdString();
int toto = _kind_of_diagram_box->currentIndex();
std::cout << toto << endl;
int kind_of_diagram = _kind_of_diagram_box->currentIndex();
// We delete the previous selected containers
if(!_selected_containers.empty()) {
_selected_containers.clear();
......@@ -111,7 +110,7 @@ void Stats_window::on_reload_button_clicked() {
// We create a drawer
DrawStats<Render_stats_opengl> *drawer;
switch (toto)
switch (kind_of_diagram)
{
case _HDIAGRAM_INDEX:
drawer = new DrawHDiagram<Render_stats_opengl>();
......@@ -121,13 +120,16 @@ void Stats_window::on_reload_button_clicked() {
break;
case _CHART_INDEX:
default:
*Message::get_instance() << kind_of_diagram << " not yet implemented" << Message::endw;
*Message::get_instance() << _kind_of_diagram_box->currentText().toStdString()
<< " not yet implemented" << Message::endw;
drawer = new DrawHDiagram<Render_stats_opengl>();
}
drawer->set_times(_start_time, _end_time);
drawer->build(_ui_stats_area, _selected_containers);
_ui_stats_area->updateGL();
delete drawer;
}
void Stats_window::close_window(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment