added set_tag to context menu. dump previous selection when append/replace or dclick_sample
updated saving figures to database. save options as a yaml blob instead of a pickle blob, seems safer