From 15216453c934edaf32af487e317b56e0e95ac70f Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 17 Jun 2018 13:01:54 -0400 Subject: [PATCH] Update item attributes panel when mutation changes (#1644) --- gui/builtinItemStatsViews/itemAttributes.py | 3 ++- gui/builtinItemStatsViews/itemMutator.py | 5 +++++ gui/itemStats.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gui/builtinItemStatsViews/itemAttributes.py b/gui/builtinItemStatsViews/itemAttributes.py index 1c9b05c4f..278ceab20 100644 --- a/gui/builtinItemStatsViews/itemAttributes.py +++ b/gui/builtinItemStatsViews/itemAttributes.py @@ -84,7 +84,8 @@ class ItemParams(wx.Panel): def RefreshValues(self, event): self._fetchValues() self.UpdateList() - event.Skip() + if event: + event.Skip() def ToggleViewMode(self, event): self.toggleView *= -1 diff --git a/gui/builtinItemStatsViews/itemMutator.py b/gui/builtinItemStatsViews/itemMutator.py index 40326b607..11f539261 100644 --- a/gui/builtinItemStatsViews/itemMutator.py +++ b/gui/builtinItemStatsViews/itemMutator.py @@ -123,6 +123,11 @@ class ItemMutator(wx.Panel): if self.timer: self.timer.Stop() self.timer = None + + for x in self.Parent.Children: + if isinstance(x, ItemParams): + x.RefreshValues(None) + break self.timer = wx.CallLater(1000, self.callLater) def resetMutatedValues(self, evt): diff --git a/gui/itemStats.py b/gui/itemStats.py index c01efdc76..b1ca79160 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -168,7 +168,7 @@ class ItemStatsContainer(wx.Panel): if isinstance(stuff, Module) and stuff.isMutated: self.mutator = ItemMutator(self.nbContainer, stuff, item) - self.nbContainer.AddPage(self.mutator, "Multiplasmid") + self.nbContainer.AddPage(self.mutator, "Mutations") self.desc = ItemDescription(self.nbContainer, stuff, item) self.nbContainer.AddPage(self.desc, "Description")