Allow plugins to prevent multiple execution of getselection JS event (#6256)

pull/5850/merge
johndoh 7 years ago committed by Aleksander Machniak
parent 3e241d728c
commit 2f7aaca342

@ -1282,12 +1282,11 @@ clear_selection: function(id, no_event)
*/
get_selection: function(deep)
{
var res;
var res = $.merge([], this.selection);
if (res = this.triggerEvent('getselection', deep))
return res;
res = $.merge([], this.selection);
var props = {deep: deep, res: res};
if (this.triggerEvent('getselection', props) === false)
return props.res;
// return children of selected threads even if only root is selected
if (deep !== false && res.length) {

Loading…
Cancel
Save