Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/lay/lay/layMacroEditorPage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,9 @@ void MacroEditorSidePanel::paintEvent (QPaintEvent *)
// MacroEditorPage implementation

MacroEditorPage::MacroEditorPage (QWidget * /*parent*/, MacroEditorHighlighters *highlighters)
: mp_macro (0), mp_highlighters (highlighters), mp_highlighter (0), m_error_line (-1), m_ntab (8), m_nindent (2), m_ignore_cursor_changed_event (false)
: mp_macro (0), mp_highlighters (highlighters), mp_highlighter (0),
m_error_line (-1), m_ntab (8), m_nindent (2), m_ignore_cursor_changed_event (false),
dm_run_mode_changed (this, &MacroEditorPage::do_run_mode_changed)
{
mp_layout = new QVBoxLayout (this);
mp_layout->setContentsMargins (0, 0, 0, 0);
Expand Down Expand Up @@ -658,6 +660,11 @@ void MacroEditorPage::current_line_changed ()
}

void MacroEditorPage::run_mode_changed ()
{
dm_run_mode_changed ();
}

void MacroEditorPage::do_run_mode_changed ()
{
// this prevents recursion when the following lines trigger anything that routes through the interpreter
bool bl = mp_exec_model->blockSignals (true);
Expand Down
3 changes: 3 additions & 0 deletions src/lay/lay/layMacroEditorPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "lymMacro.h"
#include "layGenericSyntaxHighlighter.h"
#include "tlVariant.h"
#include "tlDeferredExecution.h"

#include <QDialog>
#include <QPixmap>
Expand Down Expand Up @@ -417,12 +418,14 @@ protected slots:
QListWidget *mp_completer_list;
std::list<MacroEditorNotification> m_notifications;
std::map<const MacroEditorNotification *, QWidget *, CompareNotificationPointers> m_notification_widgets;
tl::DeferredMethod<lay::MacroEditorPage> dm_run_mode_changed;

void update_extra_selections ();
bool return_pressed ();
bool backspace_pressed ();
bool back_tab_key_pressed ();
bool tab_key_pressed ();
void do_run_mode_changed ();
void fill_completer_list ();
void complete ();
QTextCursor get_completer_cursor (int &pos0, int &pos);
Expand Down
Loading