undo/redo for editing/clearing a special item
This commit is contained in:
@@ -1444,4 +1444,12 @@ bool cItem::operator==(const cItem& other) {
|
||||
CHECK_EQ(other, rechargeable);
|
||||
CHECK_EQ(other, desc);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cSpecItem::operator==(const cSpecItem& other) {
|
||||
CHECK_EQ(other, flags);
|
||||
CHECK_EQ(other, special);
|
||||
CHECK_EQ(other, name);
|
||||
CHECK_EQ(other, descr);
|
||||
return true;
|
||||
}
|
@@ -99,6 +99,10 @@ public:
|
||||
short special = -1;
|
||||
std::string name;
|
||||
std::string descr;
|
||||
|
||||
// For detecting actual changes to special items in the scenario editor
|
||||
bool operator==(const cSpecItem& other);
|
||||
bool operator!=(const cSpecItem& other) { return !(*this == other); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user