Comment 2 for bug 1261153

Revision history for this message
Niklas Mischkulnig (mischnic) wrote :

This it not a bug, but a "feature".
OnClose gets called the same if you close the window via the red button and if you do Cmd+Q. We would need to detect that difference.
At least on Mac it would make sense to make Cmd+W close the preview WINDOW
and Cmd+Q QUIT Hugin completely regardless of the current window.

GLPreviewFrame.cpp:1425

// do not close, just hide if we're not forced
if(m_guiLevel==GUI_SIMPLE)
{
    if(!MainFrame::Get()->CloseProject(event.CanVeto()))
    {
       if (event.CanVeto())
       {
           event.Veto();
           return;
       };
    };
    MainFrame::Get()->Close(true);
}
else
{
    if (event.CanVeto())
    {
        event.Veto();
        Hide();
        DEBUG_DEBUG("hiding");
    }
    else
    {
        DEBUG_DEBUG("closing");
        this->Destroy();
    }
};