Allow Python scripts to use currently selected cases (#6906)

* #6891 Python : Make sure python scripts can be launched from context menu
* #6891 Python : Make currentScriptCaseId a general scripting feature
This commit is contained in:
Magne Sjaastad
2020-11-04 04:27:05 -05:00
committed by GitHub
parent cfccd6e943
commit 51359a0cda
8 changed files with 77 additions and 59 deletions

View File

@@ -20,6 +20,7 @@
#include "RiaSocketCommand.h"
#include "RiaApplication.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"
@@ -78,7 +79,7 @@ public:
static QString commandName() { return QString( "GetCurrentCase" ); }
bool interpretCommand( RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream ) override
{
qint64 caseId = server->currentCaseId();
qint64 caseId = RiaApplication::instance()->currentScriptCaseId();
QString caseName;
QString caseType;
qint64 caseGroupId = -1;