Skip to content

Commit

Permalink
fixes selection on NAD's non VL nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Biasuzzi <[email protected]>
  • Loading branch information
CBiasuzzi committed Dec 20, 2024
1 parent 0501fb0 commit 9ef0ffd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pypowsybl_jupyter/networkexplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def go_to_vl_from_map(event: any):

def go_to_vl_from_nad(event: any):
vl_id= str(event.selected_node['equipment_id'])
select_vl_and_activate_sld_tab(vl_id)
if sel_ctx.is_in_vls(vl_id):
select_vl_and_activate_sld_tab(vl_id)

def compute_sld_data(el):
if el is not None:
Expand Down
3 changes: 3 additions & 0 deletions src/pypowsybl_jupyter/selectcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ def add_to_history(self, id):

def get_history_as_list(self):
return [(item[self.display_attribute], item['id']) for item in self.history]

def is_in_vls(self, id):
return id in self.vls.index

0 comments on commit 9ef0ffd

Please sign in to comment.