diff options
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 9 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 | ||||
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 47 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view2d_types.h | 7 |
5 files changed, 0 insertions, 69 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index e68354dbede..16be894f9ad 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -435,10 +435,6 @@ ARegion *BKE_area_region_copy(SpaceType *st, ARegion *region) } } - if (region->v2d.tab_offset) { - newar->v2d.tab_offset = MEM_dupallocN(region->v2d.tab_offset); - } - panel_list_copy(&newar->panels, ®ion->panels); BLI_listbase_clear(&newar->ui_previews); @@ -623,11 +619,6 @@ void BKE_area_region_free(SpaceType *st, ARegion *region) region->type->free(region); } - if (region->v2d.tab_offset) { - MEM_freeN(region->v2d.tab_offset); - region->v2d.tab_offset = NULL; - } - BKE_area_region_panels_free(®ion->panels); for (uilst = region->ui_lists.first; uilst; uilst = uilst->next) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bec055803ed..5a995b3d750 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4974,9 +4974,6 @@ static void direct_link_region(BlendDataReader *reader, ARegion *region, int spa } } - region->v2d.tab_offset = NULL; - region->v2d.tab_num = 0; - region->v2d.tab_cur = 0; region->v2d.sms = NULL; region->v2d.alpha_hor = region->v2d.alpha_vert = 255; /* visible by default */ BLI_listbase_clear(®ion->panels_category); diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index d14731b81b7..8df29e5b520 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -131,9 +131,6 @@ void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, boo void UI_view2d_mask_from_win(const struct View2D *v2d, struct rcti *r_mask); -/* per tab offsets, returns 1 if tab changed */ -bool UI_view2d_tab_set(struct View2D *v2d, int tab); - void UI_view2d_zoom_cache_reset(void); /* view matrix operations */ diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index ec20aa8b55c..dddd6446c0e 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1046,53 +1046,6 @@ void UI_view2d_totRect_set(View2D *v2d, int width, int height) UI_view2d_totRect_set_resize(v2d, width, height, false); } -bool UI_view2d_tab_set(View2D *v2d, int tab) -{ - float default_offset[2] = {0.0f, 0.0f}; - float *offset, *new_offset; - bool changed = false; - - /* if tab changed, change offset */ - if (tab != v2d->tab_cur && v2d->tab_offset) { - if (tab < v2d->tab_num) { - offset = &v2d->tab_offset[tab * 2]; - } - else { - offset = default_offset; - } - - v2d->cur.xmax += offset[0] - v2d->cur.xmin; - v2d->cur.xmin = offset[0]; - - v2d->cur.ymin += offset[1] - v2d->cur.ymax; - v2d->cur.ymax = offset[1]; - - /* validation should happen in subsequent totRect_set */ - - changed = true; - } - - /* resize array if needed */ - if (tab >= v2d->tab_num) { - new_offset = MEM_callocN(sizeof(float) * (tab + 1) * 2, "view2d tab offset"); - - if (v2d->tab_offset) { - memcpy(new_offset, v2d->tab_offset, sizeof(float) * v2d->tab_num * 2); - MEM_freeN(v2d->tab_offset); - } - - v2d->tab_offset = new_offset; - v2d->tab_num = tab + 1; - } - - /* set current tab and offset */ - v2d->tab_cur = tab; - v2d->tab_offset[2 * tab + 0] = v2d->cur.xmin; - v2d->tab_offset[2 * tab + 1] = v2d->cur.ymax; - - return changed; -} - void UI_view2d_zoom_cache_reset(void) { /* TODO(sergey): This way we avoid threading conflict with sequencer rendering diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 63038b6be2d..085f463a1cc 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -67,13 +67,6 @@ typedef struct View2D { /** Pivot point for transforms (rotate and scale). */ short around; - /** Different offset per tab, for buttons. */ - float *tab_offset; - /** Number of tabs stored. */ - int tab_num; - /** Current tab. */ - int tab_cur; - /* Usually set externally (as in, not in view2d files). */ /** Alpha of vertical and horizontal scrollbars (range is [0, 255]). */ char alpha_vert, alpha_hor; |