Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
Showing only changes of commit 0a438a4d72 - Show all commits

View file

@ -111,7 +111,7 @@ auto MassManager::exportMass(int hangar) -> bool {
std::string source = Utility::Directory::join(_saveDirectory, _hangars[hangar].filename()); std::string source = Utility::Directory::join(_saveDirectory, _hangars[hangar].filename());
std::string dest = Utility::Directory::join(_stagingAreaDirectory, std::string dest = Utility::Directory::join(_stagingAreaDirectory,
Utility::formatString("{}_{}.sav", _hangars[hangar].name(), _steamId)); Utility::formatString("{}_{}.sav", *_hangars[hangar].name(), _steamId));
if(!Utility::Directory::copy(source, dest)) { if(!Utility::Directory::copy(source, dest)) {
_lastError = Utility::formatString("Couldn't export data from hangar {:.2d} to {}", hangar, dest); _lastError = Utility::formatString("Couldn't export data from hangar {:.2d} to {}", hangar, dest);
@ -187,7 +187,7 @@ void MassManager::refreshStagedMasses() {
file_list.erase(iter, file_list.end()); file_list.erase(iter, file_list.end());
for(const std::string& file : file_list) { for(const std::string& file : file_list) {
std::string name = Mass::getNameFromFile(Utility::Directory::join(_stagingAreaDirectory, file)); std::string name = *Mass::getNameFromFile(Utility::Directory::join(_stagingAreaDirectory, file));
if(!name.empty()) { if(!name.empty()) {
_stagedMasses[file] = name; _stagedMasses[file] = name;