def edit_initialize(self, fitsimage, obj):
        # remove old params
        self.w.drawvbox.remove_all()

        self.edit_obj = obj
        if (obj is not None) and self.canvas.is_selected(obj):
            self.w.attrlbl.set_text("Editing a %s" % (obj.kind))

            drawClass = obj.__class__

            # Build up a set of control widgets for the parameters
            # of the canvas object to be drawn
            paramlst = drawClass.get_params_metadata()

            self.draw_params = ParamSet.ParamSet(self.logger, obj)

            w = self.draw_params.build_params(paramlst,
                                              orientation=self.orientation)
            self.draw_params.add_callback('changed', self.edit_params_changed_cb)

            self.w.drawvbox.add_widget(w, stretch=1)
            self.w.delete_obj.set_enabled(True)
            self.w.scale_by.set_enabled(True)
            self.w.rotate_by.set_enabled(True)
        else:
            self.w.attrlbl.set_text("")

            self.w.delete_obj.set_enabled(False)
            self.w.scale_by.set_enabled(False)
            self.w.rotate_by.set_enabled(False)
dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Drawing.py/Drawing.edit_initialize/original