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') {
|
} else if (data.id == 'cut' || data.id == 'cutadd') {
|
||||||
var action = data.id == 'cut' ? 'copy' : 'add';
|
var action = data.id == 'cut' ? 'copy' : 'add';
|
||||||
fromMenu = true;
|
fromMenu = true;
|
||||||
pandora.clipboard[action](ui.listSelection, 'item');
|
if (ui.section == 'items') {
|
||||||
pandora.doHistory('cut', ui.listSelection, ui._list, function() {
|
pandora.clipboard[action](ui.listSelection, 'item');
|
||||||
pandora.UI.set({listSelection: []});
|
pandora.doHistory('cut', ui.listSelection, ui._list, function() {
|
||||||
pandora.reloadList();
|
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') {
|
} else if (data.id == 'copy' || data.id == 'copyadd') {
|
||||||
var action = data.id == 'copy' ? 'copy' : 'add';
|
var action = data.id == 'copy' ? 'copy' : 'add';
|
||||||
fromMenu = true;
|
fromMenu = true;
|
||||||
|
|
Loading…
Reference in a new issue