Skip to content

Commit

Permalink
Bind Z key (without modifiers) to toggle wireframe in 3D view
Browse files Browse the repository at this point in the history
Bind Z key (without modifiers) to toggle wireframe in 3D view
  • Loading branch information
akien-mga committed Apr 6, 2016
2 parents 646e089 + 8ee8802 commit 9dc620f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/editor/plugins/spatial_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3602,6 +3602,17 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
case KEY_E: _menu_item_pressed(MENU_TOOL_ROTATE); break;
case KEY_R: _menu_item_pressed(MENU_TOOL_SCALE); break;

case KEY_Z: {
if (k.mod.shift || k.mod.control || k.mod.command)
break;

if (view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME))) {
_menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL);
} else {
_menu_item_pressed(MENU_VIEW_DISPLAY_WIREFRAME);
}
} break;

#if 0
#endif
}
Expand Down

4 comments on commit 9dc620f

@akien-mga
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this commit happened...

@vnen
Copy link
Member

@vnen vnen commented on 9dc620f Apr 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akien-mga this is a merge commit. Somehow the commit message was copied from the merged PR.

@akien-mga
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks. I guess the PR merge mode was on "squash", then I changed it back to "create a merge commit" and it kept the old name?

@vnen
Copy link
Member

@vnen vnen commented on 9dc620f Apr 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess it might be just that.

Please sign in to comment.