cut/delete for image values

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@359 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-13 22:19:08 +00:00
parent 3702ff5846
commit 7faddb9d90
2 changed files with 20 additions and 1 deletions
+17
View File
@@ -85,3 +85,20 @@ bool ImageValueEditor::doPaste() {
sliceImage(data.GetBitmap().ConvertToImage());
return true;
}
bool ImageValueEditor::doDelete() {
getSet().actions.add(value_action(valueP(), FileName()));
return true;
}
bool ImageValueEditor::onChar(wxKeyEvent& ev) {
if (ev.AltDown() || ev.ShiftDown() || ev.ControlDown()) return false;
switch (ev.GetKeyCode()) {
case WXK_DELETE:
doDelete();
return true;
default:
return false;
}
}