diff --git a/Display.cpp b/Display.cpp index f0f9bbe..efe368a 100644 --- a/Display.cpp +++ b/Display.cpp @@ -203,7 +203,7 @@ void Display::update () { std::cout << "## no more open lines -> fin!" << std::endl; m_points.clear(); - m_textStatus.setString(text + "finished calculating convex hull in " + std::to_string(m_step / 5) + " cycles"); + if (m_points.size() == 0) m_textStatus.setString(text + "finished calculating convex hull in " + std::to_string((m_step / 4 + 1)) + " cycles"); return; } @@ -290,7 +290,7 @@ void Display::update () m_textStatus.setString(text + "remove inner points..."); size_t lines = m_lines.size() - 1; - if (lines > 2) + if (lines > 0) { // assure clockwise order Point pt1 = m_lines[lines - 1].from(); @@ -326,7 +326,7 @@ void Display::update () m_curLineIdx = -1; //m_curLine = m_lines[lines - 1]; - if (m_points.size() == 0) m_textStatus.setString(text + "finished calculating convex hull in " + std::to_string(m_step/5) + " cycles"); + if (m_points.size() == 0) m_textStatus.setString(text + "finished calculating convex hull in " + std::to_string((m_step / 4 + 1)) + " cycles"); else m_textStatus.setString(text + "adding new hull point..."); } else if (m_step > 0) m_textStatus.setString(text + "invalid status!");