Skip to content

Commit

Permalink
placeholder for all layers
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiPetukhov committed Jul 24, 2024
1 parent 2af2824 commit d006e6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ui/dtl/Layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def __init__(
if self.id is None:
self.id = action.name + "_" + "".join(random.choice("0123456789") for _ in range(8))

self._create_options = create_options
if self._create_options is None:
self._create_options = create_placeholder_options
self._create_options = create_placeholder_options
self._get_settings = get_settings
self._get_src = get_src
self._get_dst = get_dst
Expand All @@ -88,6 +86,12 @@ def __init__(
self.update_sources_cb = update_sources_cb
self._init_widgets = init_widgets

def __change_create_options(self):
self._create_options = create_options

if self._init_widgets is None:
self._init_widgets = __change_create_options

md_description = self.action.md_description.replace(
r"../../assets", r"https://raw.githubusercontent.com/supervisely/docs/master/assets"
)
Expand Down
1 change: 1 addition & 0 deletions src/ui/tabs/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def apply_json(dtl_json):
)

layer = ui_utils.create_new_layer(action_name)
layer.init_widgets()
ids.append(layer.id)
if action_name in actions_list[SOURCE_ACTIONS] or action_name == "filtered_project":
data_layers_ids.append(layer.id)
Expand Down

0 comments on commit d006e6e

Please sign in to comment.