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: 'split', title: Ox._('Split 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 || 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: '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 > 1 || 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',
|
||||
tooltip: Ox._('Options'),
|
||||
|
@ -430,6 +430,9 @@ Ox.ClipPanel = function(options, self) {
|
|||
that.triggerEvent('select', data);
|
||||
},
|
||||
sort: function(data) {
|
||||
if (['in', 'out'].indexOf(data.key) > -1) {
|
||||
data.key = 'position';
|
||||
}
|
||||
self.options.sort = [data];
|
||||
updateSortElement();
|
||||
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)
|
||||
? self.options.sort[0].key
|
||||
: 'sort';
|
||||
if (self.options.sort[0].key == 'position') {
|
||||
sort[0].key = 'in';
|
||||
}
|
||||
}
|
||||
return sort;
|
||||
}
|
||||
|
@ -524,11 +530,13 @@ Ox.ClipPanel = function(options, self) {
|
|||
}
|
||||
|
||||
function selectClips() {
|
||||
var action;
|
||||
if (self.options.editable) {
|
||||
action = self.options.selected.length ? 'enableItem' : 'disableItem';
|
||||
self.$menu[action]('split');
|
||||
self.$menu[action]('join');
|
||||
self.$menu[
|
||||
self.options.selected.length > 0 ? 'enableItem' : 'disableItem'
|
||||
]('split');
|
||||
self.$menu[
|
||||
self.options.selected.length > 1 ? 'enableItem' : 'disableItem'
|
||||
]('join');
|
||||
}
|
||||
self.$list.options({selected: self.options.selected});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue