forked from 0x2620/pandora
main menu: fix cutting clips from edit
This commit is contained in:
parent
9595b2555d
commit
b89e145660
1 changed files with 14 additions and 5 deletions
|
@ -392,11 +392,20 @@ pandora.ui.mainMenu = function() {
|
|||
} else if (data.id == 'cut' || data.id == 'cutadd') {
|
||||
var action = data.id == 'cut' ? 'copy' : 'add';
|
||||
fromMenu = true;
|
||||
if (ui.section == 'items') {
|
||||
pandora.clipboard[action](ui.listSelection, 'item');
|
||||
pandora.doHistory('cut', ui.listSelection, ui._list, function() {
|
||||
pandora.UI.set({listSelection: []});
|
||||
pandora.reloadList();
|
||||
});
|
||||
} else if (ui.section == 'edits') {
|
||||
var clips = pandora.$ui.editPanel.getSelectedClips();
|
||||
pandora.clipboard[action](clips, 'clip');
|
||||
pandora.doHistory('cut', clips, ui.edit, function() {
|
||||
pandora.UI.set({editSelection: []});
|
||||
pandora.$ui.editPanel.updatePanel();
|
||||
});
|
||||
}
|
||||
} else if (data.id == 'copy' || data.id == 'copyadd') {
|
||||
var action = data.id == 'copy' ? 'copy' : 'add';
|
||||
fromMenu = true;
|
||||
|
|
Loading…
Reference in a new issue