diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index 39e4f8d45d4feda299c3efd42ee2ec61bfd6959b..98ce08a6f3c2cb3f399cd4adc8ff03819eef47ba 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -796,8 +796,14 @@ void FlGui::setStatus(const std::string &msg, bool opengl) _lastStatus = msg; static char buff[1024]; std::string tmp = std::string(" ") + msg; - if(Msg::GetFirstError().size() && graph[0]->getMessageHeight() < FL_NORMAL_SIZE) - tmp += " - Click to show messages [ ... " + Msg::GetFirstError() + " ... ]"; + if(Msg::GetErrorCount() && graph[0]->getMessageHeight() < FL_NORMAL_SIZE){ + tmp += " - "; + char nerr[128]; sprintf(nerr, "%d", Msg::GetErrorCount()); + tmp += nerr; + tmp += (Msg::GetErrorCount() > 1) ? " Errors" : " Error"; + if(Msg::GetFirstError().size()) + tmp += " : Click to show messages [ ... " + Msg::GetFirstError() + " ... ]"; + } strncpy(buff, tmp.c_str(), sizeof(buff) - 1); buff[sizeof(buff) - 1] = '\0'; for(unsigned int i = 0; i < graph.size(); i++){ diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index 6a7f967e21498be987c03ea35006fcaf3e05ed90..a4ac6c70d8c9fe66885482a511449643433fc05f 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -2452,7 +2452,6 @@ public: if(FlGui::available()){ for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) FlGui::instance()->graph[i]->showHideMessages(); - Msg::ResetErrorCounter(); } return 1; } @@ -3012,6 +3011,7 @@ void graphicWindow::setMessageHeight(int h) void graphicWindow::showMessages() { if(!_browser || !_win->shown()) return; + Msg::ResetErrorCounter(); if(_browser->h() < FL_NORMAL_SIZE){ int height = CTX::instance()->msgSize; if(height < FL_NORMAL_SIZE) height = 10 * FL_NORMAL_SIZE;