[Bf-blender-cvs] [4fc7e388030] tracking_tools: Cleanup: Remove unused (potentially problematic) region type declaration

Julian Eisel noreply at git.blender.org
Tue Jul 20 15:00:39 CEST 2021


Commit: 4fc7e3880305a89d6c0e61a11379dbc18511a228
Author: Julian Eisel
Date:   Tue Jul 20 14:58:16 2021 +0200
Branches: tracking_tools
https://developer.blender.org/rB4fc7e3880305a89d6c0e61a11379dbc18511a228

Cleanup: Remove unused (potentially problematic) region type declaration

There were two region types declared for `RGN_TYPE_TOOLS`, there should
only ever be one. In fact this may cause problems when region types are
looked up, although it didn't seem to cause any obvious ones in this
case.

Removed the listener callback alongside it, which is written
specifically for the old tools region and shouldn't be needed anymore
either.

===================================================================

M	source/blender/editors/space_clip/space_clip.c

===================================================================

diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index ee07a26e6f5..20a8bbc10c1 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1256,38 +1256,6 @@ static void clip_tools_region_listener(const wmRegionListenerParams *params)
   wmNotifier *wmn = params->notifier;
 }
 
-/****************** tool properties region ******************/
-
-static void clip_props_region_listener(const wmRegionListenerParams *params)
-{
-  ARegion *region = params->region;
-  wmNotifier *wmn = params->notifier;
-
-  /* context changes */
-  switch (wmn->category) {
-    case NC_WM:
-      if (wmn->data == ND_HISTORY) {
-        ED_region_tag_redraw(region);
-      }
-      break;
-    case NC_SCENE:
-      if (wmn->data == ND_MODE) {
-        ED_region_tag_redraw(region);
-      }
-      break;
-    case NC_SPACE:
-      if (wmn->data == ND_SPACE_CLIP) {
-        ED_region_tag_redraw(region);
-      }
-      break;
-    case NC_GPENCIL:
-      if (wmn->action == NA_EDITED) {
-        ED_region_tag_redraw(region);
-      }
-      break;
-  }
-}
-
 /****************** properties region ******************/
 
 /* add handlers, stuff you only do once or on area/region changes */
@@ -1406,17 +1374,6 @@ void ED_spacetype_clip(void)
   BLI_addhead(&st->regiontypes, art);
   ED_clip_buttons_register(art);
 
-  /* regions: tools */
-  art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tool");
-  art->regionid = RGN_TYPE_TOOLS;
-  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
-  art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
-  art->listener = clip_props_region_listener;
-  art->init = clip_tools_region_init;
-  art->draw = clip_tools_region_draw;
-
-  BLI_addhead(&st->regiontypes, art);
-
   /* regions: tool(bar) */
   art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools");
   art->regionid = RGN_TYPE_TOOLS;



More information about the Bf-blender-cvs mailing list