mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4528 Only update the parts of project tree that is required when adding new scripts
This commit is contained in:
@@ -75,6 +75,7 @@ void RicNewPythonScriptFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
QFileInfo existingScriptFileInfo(calcScript->absoluteFileName());
|
||||
fullPathNewScript = existingScriptFileInfo.absolutePath();
|
||||
calcScript->firstAncestorOrThisOfTypeAsserted(scriptColl);
|
||||
}
|
||||
else if (scriptColl)
|
||||
{
|
||||
@@ -120,7 +121,8 @@ void RicNewPythonScriptFeature::onActionTriggered(bool isChecked)
|
||||
stream << "# Load ResInsight Processing Server Client Library\nimport rips\n# Connect to ResInsight instance\nresInsight = rips.Instance.find()\n# Example code\nprint(\"ResInsight version:\" + resInsight.app.versionString())\n";
|
||||
}
|
||||
|
||||
RicRefreshScriptsFeature::refreshScriptFolders();
|
||||
scriptColl->readContentFromDisc();
|
||||
scriptColl->updateConnectedEditors();
|
||||
|
||||
if (calcScript)
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimScriptCollection.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@@ -61,5 +62,5 @@ void RicRefreshScriptsFeature::refreshScriptFolders()
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
|
||||
proj->setScriptDirectories(prefs->scriptDirectories());
|
||||
proj->updateConnectedEditors();
|
||||
proj->scriptCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user