def _on_setting_selected(self):
        selected = self.settings_tree.selectedItems()
        if len(selected) != 1:
            self._selected_setting = None
            self._selected_plugin = None
            self._selected_setting_handle = None
            self.edit_widget.set_curves([])
            self.set_settings_visible(False)
        else:
            selected = selected[0]

            self._selected_plugin = selected._plugin_id
            self._selected_setting = selected._setting_id
            self._selected_setting_handle = selected._setting_handle

            self.lbl_current_setting.setText(self._selected_setting_handle.label)
            self.lbl_setting_desc.setText(self._selected_setting_handle.description)

            self.edit_widget.set_curves(self._selected_setting_handle.curves)

            if self._selected_setting_handle.type == "color":
                self.edit_widget.set_unit_processor(lambda x: str(int(x * 255)))
                self.btn_insert_point.hide()
            else:
                self.edit_widget.set_unit_processor(
                    lambda x: self._selected_setting_handle.format(
                        self._selected_setting_handle.get_scaled_value(x)))
                self.btn_insert_point.show()

            self.set_settings_visible(True)
            self._update_tree_widgets()
Handles main URL routing for a plugin's model-specific pages.
dataset/ETHPy150Open tobspr/RenderPipeline/toolkit/day_time_editor/main.py/DayTimeEditor._on_setting_selected--crossover with--dataset/ETHPy150Open Alir3z4/django-databrowse/django_databrowse/sites.py/DatabrowsePlugin.model_view