mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
compatibility with older wxWidgets versions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1441 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user