Add a drop-down for the script output panel to switch context

* By default we still display all messages, but this allows users to switch to
  just seeing the output from one extension if desired.
This commit is contained in:
baldurk
2026-08-13 17:46:40 +01:00
parent 768d8fa615
commit 3c6dfd23b4
5 changed files with 158 additions and 14 deletions
+14
View File
@@ -73,6 +73,7 @@ private slots:
void on_runScript_clicked();
void on_debugScript_clicked();
void on_abortRun_clicked();
void on_outputContext_currentIndexChanged(int idx);
// manual slots
void interactive_keypress(QKeyEvent *e);
@@ -81,6 +82,7 @@ private slots:
void exception(const QString &extension, const QString &type, const QString &value, int finalLine,
QList<QString> frames);
void textOutput(const QString &extension, bool isStdError, const QString &output);
void extensionLoaded(const QString &extension);
void editor_contextMenu(const QPoint &pos);
private:
@@ -99,6 +101,18 @@ private:
QString m_storedLines;
struct ScriptOutputLine
{
QString extension;
QString text;
};
rdcarray<QString> loadedExtensions;
rdcarray<ScriptOutputLine> scriptOutputLines;
size_t lastDisplayedLine = 0;
void updateScriptOutput(bool fullRefresh);
QString getDottedWordAtPoint(int scintillaPos);
PythonContext *newContext();