mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
fixed crash upon opening of random pack panel
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1569 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -466,6 +466,7 @@ void RandomPackPanel::onChangeSet() {
|
||||
seed_fixed ->SetValue(!gs.pack_seed_random);
|
||||
seed->Enable(!gs.pack_seed_random);
|
||||
setSeed(gs.pack_seed);
|
||||
generator.set = SetP(); // prevent spurious events
|
||||
FOR_EACH(pick, pickers) {
|
||||
pick.value->SetValue(gs.pack_amounts[pick.pack->name]);
|
||||
}
|
||||
@@ -559,6 +560,7 @@ void RandomPackPanel::onPackTypeClick(wxCommandEvent& ev) {
|
||||
// ----------------------------------------------------------------------------- : Generating
|
||||
|
||||
void RandomPackPanel::updateTotals() {
|
||||
if (!generator.set) return; // not initialized
|
||||
generator.reset(last_seed);
|
||||
int total_packs = 0;
|
||||
FOR_EACH(pick,pickers) {
|
||||
|
||||
Reference in New Issue
Block a user