Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-03-09 17:13:04 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-03-09 17:13:04 +0400
commitb2397db100fe182edc67d297fea4584ed6963495 (patch)
tree5ba16772a6eeed33a65f82414b826b30ec2171b2 /source/blender/editors/space_outliner/outliner_edit.c
parent7961147a597d9ae7c99ac69cf2ddd4778467ee58 (diff)
Outliner: Added recursive select/deselect (CTRL+LMB) and extend (CTRL+SHIFT+LMB)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index e3290e7dd82..78346dc54f0 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -222,12 +222,12 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T
if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
TreeStoreElem *tselem = TREESTORE(te);
- /* name and first icon */
- if (mval[0] > te->xs + UI_UNIT_X && mval[0] < te->xend) {
-
+ /* click on name */
+ if (mval[0] > te->xs + UI_UNIT_X * 2 && mval[0] < te->xend) {
do_item_rename(ar, te, tselem, reports);
+ return 1;
}
- return 1;
+ return 0;
}
for (te = te->subtree.first; te; te = te->next) {
@@ -242,14 +242,18 @@ static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float fmval[2];
+ int any_renamed = FALSE;
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1);
for (te = soops->tree.first; te; te = te->next) {
- if (do_outliner_item_rename(C, ar, soops, te, fmval)) break;
+ if (do_outliner_item_rename(C, ar, soops, te, fmval)) {
+ any_renamed = TRUE;
+ break;
+ }
}
- return OPERATOR_FINISHED;
+ return any_renamed ? OPERATOR_FINISHED : OPERATOR_PASS_THROUGH;
}