Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 236302 Details for
Bug 419043
shift-selection of tree items is wrong, needs to remember a selection's anchor item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Patch file
patch419043.txt (text/plain), 3.01 KB, created by
libing wang
on 2013-10-09 16:39:42 EDT
(
hide
)
Description:
Patch file
Filename:
MIME Type:
Creator:
libing wang
Created:
2013-10-09 16:39:42 EDT
Size:
3.01 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js >index 37f2fe7..b676693 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js >@@ -248,7 +248,7 @@ > } > }, > >- setSelection: function(model, toggling){ >+ setSelection: function(model, toggling, shiftSelectionAnchor){ > if(this._selectionPolicy === "cursorOnly"){ //$NON-NLS-0$ > if(toggling && this.explorer.renderer._useCheckboxSelection){ > this._checkRow(model,true); >@@ -273,6 +273,9 @@ > this._selections.push(model); > this._lastSelection = model; > } >+ } >+ if(shiftSelectionAnchor){ >+ this._shiftSelectionAnchor = this._lastSelection; > } > if (this.explorer.selection) { > this.explorer.renderer.storeSelections(); >@@ -539,9 +542,9 @@ > if(isPad){ > this.setSelection(model, true); > } else if(this._ctrlKeyOn(mouseEvt)){ >- this.setSelection(model, true); >- } else if(mouseEvt.shiftKey && this._lastSelection){ >- var scannedSel = this._modelIterator.scan(this._lastSelection, model); >+ this.setSelection(model, true, true); >+ } else if(mouseEvt.shiftKey && this._shiftSelectionAnchor){ >+ var scannedSel = this._modelIterator.scan(this._shiftSelectionAnchor, model); > if(scannedSel){ > this._clearSelection(true); > for(var i = 0; i < scannedSel.length; i++){ >@@ -549,7 +552,7 @@ > } > } > } else { >- this.setSelection(model, false); >+ this.setSelection(model, false, true); > } > }, > >@@ -564,7 +567,7 @@ > onUpArrow: function(e) { > this.iterate(false, false, e.shiftKey); > if(!this._ctrlKeyOn(e) && !e.shiftKey){ >- this.setSelection(this.currentModel(), false); >+ this.setSelection(this.currentModel(), false, true); > } > e.preventDefault(); > return false; >@@ -575,7 +578,7 @@ > onDownArrow: function(e) { > this.iterate(true, false, e.shiftKey); > if(!this._ctrlKeyOn(e) && !e.shiftKey){ >- this.setSelection(this.currentModel(), false); >+ this.setSelection(this.currentModel(), false, true); > } > e.preventDefault(); > return false; >@@ -615,7 +618,7 @@ > } > if(!this._modelIterator.topLevel(curModel)){ > this.cursorOn(curModel.parent); >- this.setSelection(curModel.parent, false); >+ this.setSelection(curModel.parent, false, true); > //The cursor is now on a top level item which is collapsed. We need to ask the explorer is it wants to scope up. > } else if (this.explorer.scopeUp && typeof this.explorer.scopeUp === "function"){ //$NON-NLS-0$ > this.explorer.scopeUp(); >@@ -648,7 +651,7 @@ > > //Space key toggles the check box on the current row if the renderer uses check box > onSpace: function(e) { >- this.setSelection(this.currentModel(), true); >+ this.setSelection(this.currentModel(), true, true); > e.preventDefault(); > },
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 419043
: 236302