Mercurial > octave
changeset 27267:d75c7b4f7645
fix using external editor when built without qscintilla (regression from ceb508ea92ee)
* main-window.cc (main_window): select editor window as active editor only if
editor window is properly initialized
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Fri, 19 Jul 2019 23:37:27 +0200 |
parents | 596312d4f25d |
children | ab32fd297202 |
files | libgui/src/main-window.cc |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/main-window.cc Fri Jul 19 10:02:20 2019 -0400 +++ b/libgui/src/main-window.cc Fri Jul 19 23:37:27 2019 +0200 @@ -157,7 +157,12 @@ m_variable_editor_window = new variable_editor (this); m_workspace_window = new workspace_view (this); - m_active_editor = m_editor_window; + // Set active editor depending on editor window. If the latter is + // not initialized (qscintilla not present), use the external editor. + if (m_editor_window) + m_active_editor = m_editor_window; + else + m_active_editor = m_external_editor; #if defined (HAVE_QGUIAPPLICATION_SETDESKTOPFILENAME) QGuiApplication::setDesktopFileName ("org.octave.Octave.desktop");