When pasting a control into an empty slot, wxGlade sometimes pastes the control twice (in the same slot).
Steps to reproduce:
- start wxGlade with an empty project
- create a new frame
- add a slot to the main boxsizer that was automatically created
- add a label to the first slot
- click on the label in the design frame (not in the application tree), and copy it using CTRL-C
- click the second slot, and paste the label using CTRL-V
Result: the label is pasted twice.
Workaround: the same does not occur when you paste using the context menu of the slot.
Note that -- at least in my case -- the first label retains its editing handlers (the blue squares) when you click on the second slot.
- KUbuntu Feisty, running under KDE
- Python 2.5.1
- wxPython 18.104.22.168
- wxGlade: http://wxglade.sourceforge.net/hg/wxGlade/file/59cfa4bcad62
I've traced the problem to the following: the EVT_KEY_DOWN event is raised twice when you press CTRL-V. One of the events is bound on line 46 of edit_sizers/edit_sizers.py, the other on line 487 of edit_windows.py. I don't yet understand enough of wxGlade's internals to fix this.