3D View: correct menu for moving out of local-view
Also name more clearly
This commit is contained in:
@@ -1226,6 +1226,8 @@ class VIEW3D_MT_object(Menu):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
view = context.space_data
|
||||||
|
is_local_view = (view.local_view is not None)
|
||||||
|
|
||||||
layout.operator("ed.undo")
|
layout.operator("ed.undo")
|
||||||
layout.operator("ed.redo")
|
layout.operator("ed.redo")
|
||||||
@@ -1277,7 +1279,13 @@ class VIEW3D_MT_object(Menu):
|
|||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
layout.operator("object.move_to_layer", text="Move to Layer...")
|
if is_local_view:
|
||||||
|
layout.operator_context = 'EXEC_REGION_WIN'
|
||||||
|
layout.operator("object.move_to_layer", text="Move out of Local View")
|
||||||
|
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||||
|
else:
|
||||||
|
layout.operator("object.move_to_layer", text="Move to Layer...")
|
||||||
|
|
||||||
layout.menu("VIEW3D_MT_object_showhide")
|
layout.menu("VIEW3D_MT_object_showhide")
|
||||||
|
|
||||||
layout.operator_menu_enum("object.convert", "target")
|
layout.operator_menu_enum("object.convert", "target")
|
||||||
|
@@ -1338,7 +1338,7 @@ static int move_to_layer_invoke(bContext *C, wmOperator *op, const wmEvent *even
|
|||||||
{
|
{
|
||||||
View3D *v3d = CTX_wm_view3d(C);
|
View3D *v3d = CTX_wm_view3d(C);
|
||||||
if (v3d && v3d->localvd) {
|
if (v3d && v3d->localvd) {
|
||||||
return WM_operator_confirm_message(C, op, "Move from localview");
|
return WM_operator_confirm_message(C, op, "Move out of Local View");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
move_to_layer_init(C, op);
|
move_to_layer_init(C, op);
|
||||||
|
Reference in New Issue
Block a user