neuronalmotion / blueprint

A crossplatform mockup designer based on C++/Qt5.
Apache License 2.0
7 stars 3 forks source link

Delete selected shape on delete key press #91

Closed synapticvoid closed 9 years ago

synapticvoid commented 9 years ago

Right now it works only when the QGraphicsItem has the focus (meaning not the TreeView).

We should subclass TreeView to override keyReleaseEvent, I did not do it because today the "selected shape" data is only stored in CanvasView. TreeView also needs this information to delete the proper Shape, I don't know if we should centralize this somewhere (ShapeModel?), but it seems quite ugly to completely duplicate the selection logic in TreeView.

Close #88