Commit 2336debf authored by twanvl's avatar twanvl

compatibility with older wxWidgets versions

parent af93a541
......@@ -23,7 +23,11 @@ class MSE2FileFormat : public FileFormat {
virtual bool canExport(const Game&) { return true; }
virtual SetP importSet(const String& filename) {
wxString set_name = filename;
filename.EndsWith(_("/set"), &set_name);
// Strip "/set" from the end, newer wx versions have a function for this:
// filename.EndsWith(_("/set"), &set_name);
if (filename.size() > 4 && filename.substr(filename.size()-4) == _("/set")) {
set_name = filename.substr(0, filename.size()-4);
}
SetP set(new Set);
set->open(set_name);
settings.addRecentFile(set_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment