Ticket #6873: HelpWindow.patch

File HelpWindow.patch, 1.8 KB (added by Martyn Gigg, 7 years ago)
  • Code/Mantid/MantidPlot/src/ApplicationWindow.cpp

    diff --git a/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp b/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
    index 2107d3d..3f3b656 100644
    a b void ApplicationWindow::closeEvent( QCloseEvent* ce ) 
    95559555  m_scriptInterpreter->shutdown(); 
    95569556  scriptingEnv()->finalize(); 
    95579557 
     9558  // Help window 
     9559  HelpWindow::Instance().hostShuttingDown(); 
     9560 
    95589561  ce->accept(); 
    95599562 
    95609563} 
  • Code/Mantid/MantidQt/API/inc/MantidQtAPI/HelpWindow.h

    diff --git a/Code/Mantid/MantidQt/API/inc/MantidQtAPI/HelpWindow.h b/Code/Mantid/MantidQt/API/inc/MantidQtAPI/HelpWindow.h
    index f317c34..905086e 100644
    a b public: 
    1919    void showAlgorithm(const std::string &name=std::string(), const int version=-1); 
    2020    void showAlgorithm(const QString &name, const int version=-1); 
    2121    void showFitFunction(const std::string &name=std::string()); 
     22    void hostShuttingDown(); 
    2223 
    2324private: 
    2425    friend struct Mantid::Kernel::CreateUsingNew<HelpWindowImpl>; 
  • Code/Mantid/MantidQt/API/src/HelpWindow.cpp

    diff --git a/Code/Mantid/MantidQt/API/src/HelpWindow.cpp b/Code/Mantid/MantidQt/API/src/HelpWindow.cpp
    index bc9ff56..301f6ed 100644
    a b void HelpWindowImpl::showFitFunction(const std::string &name) 
    114114} 
    115115 
    116116/** 
     117 * Can be called by the host process to indicate that it will 
     118 * close soon. This closes the help window & releases the QProcess 
     119 */ 
     120void HelpWindowImpl::hostShuttingDown() 
     121{ 
     122  if(m_process) 
     123  { 
     124    m_process->kill(); 
     125    // Delete 
     126    m_process.reset(); 
     127  } 
     128} 
     129 
     130 
     131/** 
    117132 * Start up the help browser in a separate process. 
    118133 * 
    119134 * This will only do something if the browser is not already