mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
added SymbolValueEditor + minor fixes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@96 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -43,6 +43,7 @@ void ActionStack::add(Action* action, bool allow_merge) {
|
||||
|
||||
void ActionStack::undo() {
|
||||
assert(canUndo());
|
||||
if (!canUndo()) return;
|
||||
Action* action = undo_actions.back();
|
||||
action->perform(true);
|
||||
tellListeners(*action, true);
|
||||
@@ -52,6 +53,7 @@ void ActionStack::undo() {
|
||||
}
|
||||
void ActionStack::redo() {
|
||||
assert(canRedo());
|
||||
if (!canRedo()) return;
|
||||
Action* action = redo_actions.back();
|
||||
action->perform(false);
|
||||
tellListeners(*action, false);
|
||||
|
||||
@@ -203,7 +203,7 @@ String Package::nameOut(const String& file) {
|
||||
}
|
||||
}
|
||||
|
||||
String Package::newFileName(const String& prefix, const String& suffix) {
|
||||
FileName Package::newFileName(const String& prefix, const String& suffix) {
|
||||
assert(wxThread::IsMain()); // Writing should only be done from the main thread
|
||||
String name;
|
||||
UInt infix = 0;
|
||||
|
||||
@@ -98,7 +98,7 @@ class Package {
|
||||
/// Creates a new, unique, filename with the specified prefix and suffix
|
||||
/// for example newFileName("image/",".jpg") -> "image/1.jpg"
|
||||
/// Returns the name of a temporary file that can be written to.
|
||||
String newFileName(const String& prefix, const String& suffix);
|
||||
FileName newFileName(const String& prefix, const String& suffix);
|
||||
|
||||
/// Signal that a file is still used by this package.
|
||||
/// Must be called for files not opened using openOut/nameOut
|
||||
|
||||
+5
-1
@@ -66,7 +66,11 @@ typedef unsigned int UInt;
|
||||
#define nullptr 0
|
||||
|
||||
/// A string standing for a filename, has different behaviour when reading/writing
|
||||
class FileName : public String {};
|
||||
class FileName : public String {
|
||||
public:
|
||||
FileName() {}
|
||||
FileName(const String& s) : String(s) {}
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user