dont sort by in/out; "Join Selected Clips at Cuts" should only be active if > 1 clip is selected fixes #2214
This commit is contained in:
parent
ab3bb7bdcd
commit
9cd62ab222
1 changed files with 15 additions and 7 deletions
|
@ -173,9 +173,9 @@ Ox.ClipPanel = function(options, self) {
|
||||||
{id: 'annotations', title: Ox._('View Annotations'), checked: self.options.view == 'annotations'},
|
{id: 'annotations', title: Ox._('View Annotations'), checked: self.options.view == 'annotations'},
|
||||||
]},
|
]},
|
||||||
{},
|
{},
|
||||||
{id: 'split', title: Ox._('Split Selected Clips at Cuts'), disabled: !self.options.editable || !self.options.selected.length || self.options.view == 'annotations'},
|
{id: 'split', title: Ox._('Split Selected Clips at Cuts'), disabled: !self.options.editable || !self.options.selected.length > 0 || self.options.view == 'annotations'},
|
||||||
{id: 'join', title: Ox._('Join Selected Clips at Cuts'), disabled: !self.options.editable || !self.options.selected.length || self.options.view == 'annotations'},
|
{id: 'join', title: Ox._('Join Selected Clips at Cuts'), disabled: !self.options.editable || !self.options.selected.length > 1 || self.options.view == 'annotations'},
|
||||||
{id: 'replace', title: Ox._('Make Selected Clips Editable'), disabled: !self.options.editable || !self.options.selected.length || self.options.view == 'annotations'}
|
{id: 'replace', title: Ox._('Make Selected Clips Editable'), disabled: !self.options.editable || !self.options.selected.length > 0 || self.options.view == 'annotations'}
|
||||||
],
|
],
|
||||||
title: 'set',
|
title: 'set',
|
||||||
tooltip: Ox._('Options'),
|
tooltip: Ox._('Options'),
|
||||||
|
@ -430,6 +430,9 @@ Ox.ClipPanel = function(options, self) {
|
||||||
that.triggerEvent('select', data);
|
that.triggerEvent('select', data);
|
||||||
},
|
},
|
||||||
sort: function(data) {
|
sort: function(data) {
|
||||||
|
if (['in', 'out'].indexOf(data.key) > -1) {
|
||||||
|
data.key = 'position';
|
||||||
|
}
|
||||||
self.options.sort = [data];
|
self.options.sort = [data];
|
||||||
updateSortElement();
|
updateSortElement();
|
||||||
self.$list.options({sortable: isSortable()});
|
self.$list.options({sortable: isSortable()});
|
||||||
|
@ -467,6 +470,9 @@ Ox.ClipPanel = function(options, self) {
|
||||||
sort[0].key = Ox.getObjectById(self.columns, self.options.sort[0].key)
|
sort[0].key = Ox.getObjectById(self.columns, self.options.sort[0].key)
|
||||||
? self.options.sort[0].key
|
? self.options.sort[0].key
|
||||||
: 'sort';
|
: 'sort';
|
||||||
|
if (self.options.sort[0].key == 'position') {
|
||||||
|
sort[0].key = 'in';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return sort;
|
return sort;
|
||||||
}
|
}
|
||||||
|
@ -524,11 +530,13 @@ Ox.ClipPanel = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectClips() {
|
function selectClips() {
|
||||||
var action;
|
|
||||||
if (self.options.editable) {
|
if (self.options.editable) {
|
||||||
action = self.options.selected.length ? 'enableItem' : 'disableItem';
|
self.$menu[
|
||||||
self.$menu[action]('split');
|
self.options.selected.length > 0 ? 'enableItem' : 'disableItem'
|
||||||
self.$menu[action]('join');
|
]('split');
|
||||||
|
self.$menu[
|
||||||
|
self.options.selected.length > 1 ? 'enableItem' : 'disableItem'
|
||||||
|
]('join');
|
||||||
}
|
}
|
||||||
self.$list.options({selected: self.options.selected});
|
self.$list.options({selected: self.options.selected});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue