Fix #111212: Error running search if cursor is outside Blender window #111254
|
@ -266,6 +266,9 @@ class NewGeometryNodeGroupTool(Operator):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not context.space_data:
|
||||
# Does not exist if the search menu is called while the cursor is outside the Blender window.
|
||||
return False
|
||||
return context.space_data.type == 'NODE_EDITOR' and context.space_data.geometry_nodes_type == 'TOOL'
|
||||
|
||||
def execute(self, context):
|
||||
|
|
|
@ -3240,7 +3240,10 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
|
|||
static bool keyframe_jump_poll(bContext *C)
|
||||
{
|
||||
/* There is a keyframe jump operator specifically for the Graph Editor. */
|
||||
return ED_operator_screenactive_norender(C) && CTX_wm_area(C)->spacetype != SPACE_GRAPH;
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
/* The area can be a nullptr when the search menu is called while the cursor is outside the
|
||||
* blender window. */
|
||||
return ED_operator_screenactive_norender(C) && (!area || area->spacetype != SPACE_GRAPH);
|
||||
}
|
||||
|
||||
static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
|
||||
|
|
Loading…
Reference in New Issue