mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Python: avoid __pycache__ turning up as sub-folder in Script Collection
This commit is contained in:
parent
8d1e8fc022
commit
4161171608
@ -37,7 +37,7 @@ RimScriptCollection::RimScriptCollection()
|
|||||||
{
|
{
|
||||||
CAF_PDM_InitObject("ScriptLocation", ":/Folder.png", "", "");
|
CAF_PDM_InitObject("ScriptLocation", ":/Folder.png", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&directory, "ScriptDirectory", "Dir", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&directory, "ScriptDirectory", "Folder", "", "", "");
|
||||||
CAF_PDM_InitFieldNoDefault(&calcScripts, "CalcScripts", "", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&calcScripts, "CalcScripts", "", "", "", "");
|
||||||
calcScripts.uiCapability()->setUiHidden(true);
|
calcScripts.uiCapability()->setUiHidden(true);
|
||||||
CAF_PDM_InitFieldNoDefault(&subDirectories, "SubDirectories", "", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&subDirectories, "SubDirectories", "", "", "", "");
|
||||||
@ -113,13 +113,15 @@ void RimScriptCollection::readContentFromDisc()
|
|||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
QFileInfo fi = it.next();
|
QFileInfo fi = it.next();
|
||||||
|
if (fi.baseName() != "__pycache__")
|
||||||
|
{
|
||||||
|
RimScriptCollection* scriptLocation = new RimScriptCollection;
|
||||||
|
scriptLocation->directory = fi.absoluteFilePath();
|
||||||
|
scriptLocation->setUiName(fi.baseName());
|
||||||
|
scriptLocation->readContentFromDisc();
|
||||||
|
|
||||||
RimScriptCollection* scriptLocation = new RimScriptCollection;
|
subDirectories.push_back(scriptLocation);
|
||||||
scriptLocation->directory = fi.absoluteFilePath();
|
}
|
||||||
scriptLocation->setUiName(fi.baseName());
|
|
||||||
scriptLocation->readContentFromDisc();
|
|
||||||
|
|
||||||
subDirectories.push_back(scriptLocation);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user