Skip to content

Commit

Permalink
Avoid incorrect error message related to renamed session configuratio…
Browse files Browse the repository at this point in the history
…n file

Re ECFLOW-1980
  • Loading branch information
marcosbento committed Oct 29, 2024
1 parent 43d4f5f commit ed1acad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Viewer/ecflowUI/src/SessionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ SessionItem::~SessionItem() {
}
}

void SessionItem::name(const std::string& name) {
name_ = name;
// Since the name changes, we need to update the related directory paths
dirPath_ = SessionHandler::sessionDirName(name_);
qtPath_ = SessionHandler::sessionQtDirName(name_);
}

void SessionItem::checkDir() {
dirPath_ = SessionHandler::sessionDirName(name_);
DirectoryHandler::createDir(dirPath_);
Expand Down
2 changes: 1 addition & 1 deletion Viewer/ecflowUI/src/SessionHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SessionItem {
explicit SessionItem(const std::string&);
virtual ~SessionItem();

void name(const std::string& name) { name_ = name; }
void name(const std::string& name);
const std::string& name() const { return name_; }

std::string sessionFile() const;
Expand Down

0 comments on commit ed1acad

Please sign in to comment.