Commit 0f36eb57 authored by Johnny Jazeix's avatar Johnny Jazeix

Compilation effective. Suppression des evenements lors de l'ouverture

d'une trace (a part le lapin parce qu'il est mimi :p). Debut de 
correction pour que les tests marchent.
parent 86c8a54c
......@@ -121,13 +121,14 @@ bool Interface_console::draw_trace(const string & filename, const int format){
// thread.start();
if (NULL == _trace){/* no trace is loaded, parse the file */
_trace = new Trace();
try{
try {
_main_window->setDisabled (true);
parser.parse(filename, *_trace);
}
catch (const string &error) {
_main_window->setDisabled (false);
Error::print_numbers();
Error::flush_in_file("log.txt");
//delete _progress_dialog;
......@@ -135,7 +136,8 @@ bool Interface_console::draw_trace(const string & filename, const int format){
QApplication::restoreOverrideCursor();
return false;
}
_main_window->setDisabled (false);
}else if ( _file_opened != filename){/* just check if execution is normal */
*Message::get_instance() << "Try to use file: " << filename << " instead of a previous parsed file: " << _file_opened << Message::ende;
......@@ -573,9 +575,10 @@ void Interface_console::launch_action(int state, void* arg){
case _STATE_RENDER_DISPLAY_INFORMATION:
buf.display_information(_trace, Info::Render::_info_x, Info::Render::_info_y, Info::Render::_info_accurate);
if(_trace != NULL){
buf.display_information(_trace, Info::Render::_info_x, Info::Render::_info_y, Info::Render::_info_accurate);
}
break;
default:/* like _STATE_UNKNOWN */
......
......@@ -603,9 +603,15 @@ void Interface_graphic::on_scale_container_state_valueChanged(int new_value){
void Interface_graphic::closeEvent(QCloseEvent *event){
((QWidget*)_help_widget)->close();
event->accept();/* accept to hide the window for a further destruction */
_help_widget->close();
if(isEnabled()){
event->accept();/* accept to hide the window for a further destruction */
}
else{
event->ignore();
}
}
const std::string Interface_graphic::get_filename() const{
......
......@@ -1292,11 +1292,11 @@ void Render_opengl::create_ruler(){
if (0.0 != greatest_graduation){
degree=0;
for (int i=1 ; greatest_graduation*i < 0.1 ; i*=10){
degree++;
for (int i = 1 ; greatest_graduation*i < 0.1 ; i*=10){
degree ++;
}
coeff_mul_10 = pow(10, degree);
coeff_mul_10 = pow(10., (int)degree);
}else{
coeff_mul_10 = 1;
}
......
......@@ -331,7 +331,7 @@ Container *Trace::search_container_type(String name){
Container *Trace::search_container(String name){
string* res = new string("search(" + name.to_string() + ")");
string* res = new string("search(" + name + ")");
to_freed.push_back(res);
return res;
}
......
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