Skip to content

Commit 66cb98c

Browse files
committed
impress: fixed incorrect slide pasting position
problem: when context menu was invoked by clicking on the empty spaces in the slidesorter, and slides were pasted using option in the context menu, slides were always pasted at the end and not where it was clicked Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I2aba5d37ffca1eb86b02d76563887eae71ace2e6
1 parent 3230735 commit 66cb98c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

browser/src/control/Control.PartsPreview.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,9 @@ window.L.Control.PartsPreview = window.L.Control.extend({
268268
paste: {
269269
name: app.IconUtil.createMenuItemLink(_('Paste Slide'), 'Paste'),
270270
isHtmlName: true,
271-
callback: function(key, options) {
272-
var part = that._findClickedPart(options.$trigger[0].parentNode);
273-
if (part !== null) {
271+
callback: function() {
274272
that._setPart(that.copiedSlide);
275-
that._map.duplicatePage(parseInt(part));
276-
}
273+
that._map.duplicatePage(parseInt(nPos));
277274
},
278275
visible: function() {
279276
return that.copiedSlide;

0 commit comments

Comments
 (0)