Skip to content

Commit 0ee4dc5

Browse files
committed
Clarify #620 comment explaining the multi-origin disambiguation
1 parent acc4c0d commit 0ee4dc5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/spatialdata_plot/pl/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,9 @@ def _set_color_source_vec(
10781078
table_name=table_name,
10791079
)
10801080

1081-
# When `table_name=` is explicit, an element column with the same name is
1082-
# shadowed by that choice (#620); drop the df origin so the table wins.
1081+
# Issue #620: when both the element's own dataframe and the chosen table
1082+
# contain a column with this name, an explicit `table_name=` resolves the
1083+
# ambiguity — keep only the table origin and skip the multi-origin error below.
10831084
explicit_table_shadows_df = table_name is not None and any(o.origin == "df" for o in origins)
10841085
if explicit_table_shadows_df:
10851086
origins = [o for o in origins if o.origin != "df"]

0 commit comments

Comments
 (0)