Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_dragdrop.c
| Show First 20 Lines • Show All 1,207 Lines • ▼ Show 20 Lines | else { | ||||
| changed = true; | changed = true; | ||||
| if (te->next && outliner_is_collection_tree_element(te->next)) { | if (te->next && outliner_is_collection_tree_element(te->next)) { | ||||
| *r_tooltip = TIP_("Move between collections"); | *r_tooltip = TIP_("Move between collections"); | ||||
| } | } | ||||
| else { | else { | ||||
| *r_tooltip = TIP_("Move after collection"); | *r_tooltip = TIP_("Move after collection"); | ||||
| } | } | ||||
| break; | break; | ||||
| case TE_INSERT_INTO: | case TE_INSERT_INTO: { | ||||
Blendify: The use of braces here does not follow the style guide | |||||
HooglyBooglyAuthorUnsubmitted Done Inline ActionsHah, doesn't the style guide say Always Use Braces? For switch statements I've seen it both ways, it depends on the case I think. Anyway, the braces are required for declaring variables inside case blocks. (Not the last case actually, but it's good practice). HooglyBoogly: Hah, doesn't the style guide say `Always Use Braces`? For switch statements I've seen it both… | |||||
| tselem->flag |= TSE_DRAG_INTO; | tselem->flag |= TSE_DRAG_INTO; | ||||
| changed = true; | changed = true; | ||||
| /* Check the type of the drag IDs to avoid the incorrect "Shift to parent" | |||||
| * for collections. Checking the type of the first ID works fine here. */ | |||||
| wmDragID *drag_id = (wmDragID *)drag->ids.first; | |||||
| const bool is_collection = (GS(drag_id->id->name) == ID_GR); | |||||
| if (is_collection) { | |||||
| *r_tooltip = TIP_("Move inside collection (Ctrl to link)"); | |||||
| } | |||||
| else { | |||||
| *r_tooltip = TIP_("Move inside collection (Ctrl to link, Shift to parent)"); | *r_tooltip = TIP_("Move inside collection (Ctrl to link, Shift to parent)"); | ||||
| } | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| if (changed) { | if (changed) { | ||||
| ED_region_tag_redraw_no_rebuild(region); | ED_region_tag_redraw_no_rebuild(region); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| if (changed) { | if (changed) { | ||||
| ED_region_tag_redraw_no_rebuild(region); | ED_region_tag_redraw_no_rebuild(region); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines | |||||
The use of braces here does not follow the style guide