mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Added 'card' to value actions, this fixes a bug where extra fields get updated with the wrong context, and it should also speed things up.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@673 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -35,8 +35,8 @@ SymbolWindow::SymbolWindow(Window* parent, const String& filename) {
|
||||
init(parent, symbol);
|
||||
}
|
||||
|
||||
SymbolWindow::SymbolWindow(Window* parent, const SymbolValueP& value, const SetP& set)
|
||||
: value(value), set(set)
|
||||
SymbolWindow::SymbolWindow(Window* parent, const SetP& set, const Card* card, const SymbolValueP& value)
|
||||
: value(value), card(card), set(set)
|
||||
{
|
||||
// attempt to load symbol
|
||||
SymbolP symbol;
|
||||
@@ -236,7 +236,7 @@ void SymbolWindow::onFileStore(wxCommandEvent& ev) {
|
||||
FileName new_filename = set->newFileName(value->field().name,_(".mse-symbol")); // a new unique name in the package
|
||||
Writer writer(set->openOut(new_filename));
|
||||
writer.handle(control->getSymbol());
|
||||
set->actions.add(value_action(value, new_filename));
|
||||
set->actions.add(value_action(card, value, new_filename));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
class SymbolControl;
|
||||
//%%class SymbolPartList;
|
||||
class SymbolPartList;
|
||||
class Card;
|
||||
DECLARE_POINTER_TYPE(SymbolValue);
|
||||
DECLARE_POINTER_TYPE(Set);
|
||||
|
||||
@@ -29,7 +29,7 @@ class SymbolWindow : public Frame {
|
||||
/// Construct a SymbolWindow showing a symbol from a file
|
||||
SymbolWindow(Window* parent, const String& filename);
|
||||
/// Construct a SymbolWindow showing a symbol value in a set
|
||||
SymbolWindow(Window* parent, const SymbolValueP& value, const SetP& set);
|
||||
SymbolWindow(Window* parent, const SetP& set, const Card* card, const SymbolValueP& value);
|
||||
|
||||
private:
|
||||
// --------------------------------------------------- : Children
|
||||
@@ -42,6 +42,7 @@ class SymbolWindow : public Frame {
|
||||
|
||||
// when editing a symbol field
|
||||
SymbolValueP value;
|
||||
const Card* card;
|
||||
SetP set;
|
||||
|
||||
// --------------------------------------------------- : Event handling
|
||||
|
||||
Reference in New Issue
Block a user