Fixed pasted items being inserted behind existing items

This commit is contained in:
Rebecca Breu 2024-05-04 17:04:40 +02:00
parent 5f4c5088f0
commit 6ddccd875d
3 changed files with 7 additions and 3 deletions

View file

@ -31,7 +31,8 @@ Fixed
hangs/weird behaviour)
* Fixed an intermittent crash when invoking New Scene
* Fixed bee files hanging on to disk space of deleted images (issue #99)
* Fixing Drag @ Drop from pinterest feed (by Randommist)
* Fixed Drag @ Drop from pinterest feed (by Randommist)
* Fixed pasted items being inserted behind existing items

View file

@ -40,6 +40,7 @@ class InsertItems(QtGui.QUndoCommand):
for item in self.items:
self.scene.addItem(item)
item.setSelected(True)
item.bring_to_front()
def undo(self):
self.scene.deselect_all_items()

View file

@ -18,7 +18,7 @@ import logging
from PyQt6 import QtCore, QtGui
from PyQt6.QtCore import Qt
from beeref import commands
from beeref import commands, widgets
from beeref.items import BeePixmapItem
from beeref import fileio
@ -80,7 +80,9 @@ class MainControlsMixin:
elif mimedata.hasImage():
event.acceptProposedAction()
else:
logger.info('Attempted drop not an image')
msg = 'Attempted drop not an image'
logger.info(msg)
widgets.BeeNotification(self.control_target, msg)
def dragMoveEvent(self, event):
event.acceptProposedAction()