Skip to content

Commit

Permalink
Runtime Manager, update OnLink() in dialog class to use frame.button_xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
kondoh committed Aug 9, 2016
1 parent 3df2690 commit 8283113
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2634,8 +2634,8 @@ def OnOk(self, event):

def OnLink(self, event):
obj = event.GetEventObject()
dic = { self.hyperlink_car : self.frame.button_launch_car_dpm,
self.hyperlink_pedestrian : self.frame.button_launch_pedestrian_dpm }
dic = { self.hyperlink_car : self.frame.button_car_dpm,
self.hyperlink_pedestrian : self.frame.button_pedestrian_dpm }
obj = dic.get(obj)
if obj:
self.frame.OnHyperlinked_obj(obj)
Expand Down Expand Up @@ -2670,7 +2670,7 @@ def OnLink(self, event):
obj = event.GetEventObject()
car_ped = { self.hyperlink_car : 'car', self.hyperlink_pedestrian : 'pedestrian' }.get(obj, 'car')
obj_key = self.gdic.get('car_pedestrian_obj_key', {}).get(car_ped)
obj = getattr(self.frame, 'button_launch_' + obj_key, None) if obj_key else None
obj = getattr(self.frame, 'button_' + obj_key, None) if obj_key else None
if obj:
self.frame.OnHyperlinked_obj(obj)
self.EndModal(0)
Expand Down

0 comments on commit 8283113

Please sign in to comment.