<commit_before>#include <numeric>

#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtx/compatibility.hpp"
#include "glm/gtx/epsilon.hpp"
#include "glm/gtx/quaternion.hpp"

#include "wx/dir.h"

#include "MainFrame.hpp"

void MainFrame::OnUpdateUI(wxUpdateUIEvent& event)
{
    switch(event.GetId())
    {
    case ID_RECONSTRUCT:                    event.Enable(m_has_images);         break;

    case ID_EXPORT_MATCHES:                 event.Enable(m_matches_loaded);     break;
    case ID_EXPORT_TRACKS:                  event.Enable(m_matches_loaded);     break;
    case ID_EXPORT_CMVS:                    event.Enable(m_sfm_done);           break;
    case ID_EXPORT_BUNDLE_FILE:             event.Enable(m_sfm_done);           break;
    case ID_EXPORT_PLY_FILE:                event.Enable(m_sfm_done);           break;
    case ID_EXPORT_MESHLAB_FILE:            event.Enable(m_sfm_done);           break;
    case ID_EXPORT_MAYA_FILE:               event.Enable(m_sfm_done);           break;

    case ID_TOGGLE_FRUSTRUM_VISIBILITY:     event.Enable(m_sfm_done);           break;
    case ID_TOGGLE_POINTS_VISIBILITY:       event.Enable(m_sfm_done);           break;
    case ID_TOGGLE_CAMERAS_VISIBILITY:      event.Enable(m_sfm_done);           break;

    case ID_PANE_MATCHES:                   event.Enable(m_sfm_done);           break;
    default:                                event.Skip();
    }
}

void MainFrame::OnMenuExit(wxCommandEvent& event)
{
    this->Close();
}

void MainFrame::OnClose(wxCloseEvent& event)
{
    m_turntable_timer->Stop();
    m_reset_viewport_timer->Stop();

    this->Destroy();
}

void MainFrame::OnViewWindows(wxCommandEvent& event)
{
    switch(event.GetId())
    {
    case ID_VIEW_IMAGE_BROWSER:<commit_msg>proper closing on close event<commit_after>#include <numeric>

#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtx/compatibility.hpp"
#include "glm/gtx/epsilon.hpp"
#include "glm/gtx/quaternion.hpp"

#include "wx/dir.h"

#include "MainFrame.hpp"

void MainFrame::OnUpdateUI(wxUpdateUIEvent& event)
{
    switch(event.GetId())
    {
    case ID_RECONSTRUCT:                    event.Enable(m_has_images);         break;

    case ID_EXPORT_MATCHES:                 event.Enable(m_matches_loaded);     break;
    case ID_EXPORT_TRACKS:                  event.Enable(m_matches_loaded);     break;
    case ID_EXPORT_CMVS:                    event.Enable(m_sfm_done);           break;
    case ID_EXPORT_BUNDLE_FILE:             event.Enable(m_sfm_done);           break;
    case ID_EXPORT_PLY_FILE:                event.Enable(m_sfm_done);           break;
    case ID_EXPORT_MESHLAB_FILE:            event.Enable(m_sfm_done);           break;
    case ID_EXPORT_MAYA_FILE:               event.Enable(m_sfm_done);           break;

    case ID_TOGGLE_FRUSTRUM_VISIBILITY:     event.Enable(m_sfm_done);           break;
    case ID_TOGGLE_POINTS_VISIBILITY:       event.Enable(m_sfm_done);           break;
    case ID_TOGGLE_CAMERAS_VISIBILITY:      event.Enable(m_sfm_done);           break;

    case ID_PANE_MATCHES:                   event.Enable(m_sfm_done);           break;
    default:                                event.Skip();
    }
}

void MainFrame::OnMenuExit(wxCommandEvent& event)
{
    this->Close();
}

void MainFrame::OnClose(wxCloseEvent& event)
{
    m_turntable_timer->Stop();
    m_reset_viewport_timer->Stop();
}

void MainFrame::OnViewWindows(wxCommandEvent& event)
{
    switch(event.GetId())
    {
    case ID_VIEW_IMAGE_BROWSER:
{'fraction_non_alphanumeric': 0.09892290249433107, 'fraction_numerical': 0.0, 'mean_word_length': 2.3802681992337167, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6691764', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1178, 'n_words': 170}