OSDN Git Service

add amulet search with fixed seed2
[amulettoolsmh4/main.git] / view / notebookalchemysimulatorview.py
index 06e8f5b..9b44c7f 100644 (file)
@@ -92,8 +92,14 @@ class NoteBookAlchemySimulatorView():
 
     def set_seed_values(self, seed1, seed2):
         u""" TextCtrlに与えられた値をセットする"""
-        self.text_ctrl_seed1.SetValue(u"{0}".format(seed1))
-        self.text_ctrl_seed2.SetValue(u"{0}".format(seed2))
+        if seed1 is not None:
+            self.text_ctrl_seed1.SetValue(u"{0}".format(seed1))
+        else:
+            self.text_ctrl_seed1.SetValue(u"")
+        if seed2 is not None:
+            self.text_ctrl_seed2.SetValue(u"{0}".format(seed2))
+        else:
+            self.text_ctrl_seed2.SetValue(u"")
 
     def clear_seed_values(self):
         u""" TextCtrlに与えられた値をセットする"""