mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3452 Command execution. Clear cached data before executing new commands
This commit is contained in:
parent
273c2912ae
commit
ce26437130
@ -61,6 +61,8 @@ void RicfCommandFileExecutor::executeCommands(QTextStream& stream)
|
|||||||
RicfMessages messages;
|
RicfMessages messages;
|
||||||
std::vector<RicfCommandObject*> executableCommands;
|
std::vector<RicfCommandObject*> executableCommands;
|
||||||
{
|
{
|
||||||
|
clearCachedData();
|
||||||
|
|
||||||
std::vector<RicfCommandObject*> fileCommands = RicfCommandFileReader::readCommands(stream, caf::PdmDefaultObjectFactory::instance(), &messages);
|
std::vector<RicfCommandObject*> fileCommands = RicfCommandFileReader::readCommands(stream, caf::PdmDefaultObjectFactory::instance(), &messages);
|
||||||
for (auto message : messages.m_messages)
|
for (auto message : messages.m_messages)
|
||||||
{
|
{
|
||||||
@ -214,3 +216,12 @@ std::vector<RicfCommandObject*> RicfCommandFileExecutor::prepareFileCommandsForE
|
|||||||
|
|
||||||
return executableCommands;
|
return executableCommands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicfCommandFileExecutor::clearCachedData()
|
||||||
|
{
|
||||||
|
m_exportPaths.clear();
|
||||||
|
m_lastProjectPath.clear();
|
||||||
|
}
|
||||||
|
@ -60,6 +60,8 @@ public:
|
|||||||
static std::vector<RicfCommandObject*> prepareFileCommandsForExecution(const std::vector<RicfCommandObject*>& commandsReadFromFile);
|
static std::vector<RicfCommandObject*> prepareFileCommandsForExecution(const std::vector<RicfCommandObject*>& commandsReadFromFile);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void clearCachedData();
|
||||||
|
|
||||||
std::map<ExportType, QString> m_exportPaths;
|
std::map<ExportType, QString> m_exportPaths;
|
||||||
QString m_lastProjectPath;
|
QString m_lastProjectPath;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user