Skip to content

Commit

Permalink
Rename GUI facing "instance_groups" to "instance groups"
Browse files Browse the repository at this point in the history
  • Loading branch information
roomrys committed Nov 1, 2024
1 parent 4b7d3a7 commit 08afb9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sleap/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def _initialize_gui(self):
"""Creates menus, dock windows, starts timers to update gui state."""

self.state["distinctly_color"] = prefs["distinctly_color"]

self._create_color_manager()
self._create_video_player()
self.statusBar()
Expand Down Expand Up @@ -658,7 +658,7 @@ def prev_vid():
key="palette",
)

distinctly_color_options = ("instance_groups", "instances", "nodes", "edges")
distinctly_color_options = ("instance groups", "instances", "nodes", "edges")

add_submenu_choices(
menu=viewMenu,
Expand Down
2 changes: 1 addition & 1 deletion sleap/gui/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def get_item_color(

return (128, 128, 128)

if self.distinctly_color == "instance_groups" and parent_instance:
if self.distinctly_color == "instance groups" and parent_instance:

if parent_frame is None and parent_instance:
parent_frame = parent_instance.frame
Expand Down
2 changes: 1 addition & 1 deletion sleap/gui/dataviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def item_to_data(self, obj, item: InstanceGroup):

def get_item_color(self, instance_group: InstanceGroup, key: str):
color_manager = self.context.app.color_manager
if color_manager.distinctly_color == "instance_groups" and key == "name":
if color_manager.distinctly_color == "instance groups" and key == "name":

# Get the RecordingSession
state = self.context.state
Expand Down
7 changes: 4 additions & 3 deletions sleap/io/visuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def _plot_instance_cv(
)

if self.show_edges:
for (src, dst) in instance.skeleton.edge_inds:
for src, dst in instance.skeleton.edge_inds:
# Get points for the nodes connected by this edge
src_x, src_y = points_array[src]
dst_x, dst_y = points_array[dst]
Expand Down Expand Up @@ -542,8 +542,9 @@ def save_labeled_video(
for what instance/node/edge
palette: SLEAP color palette to use. Options include: "alphabet", "five+",
"solarized", or "standard". Only used if `color_manager` is None.
distinctly_color: Specify how to color instances. Options include: "instances",
"edges", and "nodes". Only used if `color_manager` is None.
distinctly_color: Specify how to color instances. Options include:
"instance groups", "instances", "edges", and "nodes". Only used if
`color_manager` is None.
gui_progress: Whether to show Qt GUI progress dialog.
Returns:
Expand Down

0 comments on commit 08afb9f

Please sign in to comment.