Commit 81e88a78 authored by twanvl's avatar twanvl

cut/delete for image values

parent 4f4a901f
......@@ -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;
}
}
......@@ -25,10 +25,12 @@ class ImageValueEditor : public ImageValueViewer, public ValueEditor {
// --------------------------------------------------- : Clipboard
virtual bool canCopy() const;
virtual bool canCut() const { return false; }
virtual bool canPaste() const;
virtual bool doCopy();
virtual bool doPaste();
virtual bool doDelete();
virtual bool onChar(wxKeyEvent&);
private:
// Open the image slice window showing the give image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment