mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
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:
@@ -85,3 +85,20 @@ bool ImageValueEditor::doPaste() {
|
|||||||
sliceImage(data.GetBitmap().ConvertToImage());
|
sliceImage(data.GetBitmap().ConvertToImage());
|
||||||
return true;
|
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
|
// --------------------------------------------------- : Clipboard
|
||||||
|
|
||||||
virtual bool canCopy() const;
|
virtual bool canCopy() const;
|
||||||
virtual bool canCut() const { return false; }
|
|
||||||
virtual bool canPaste() const;
|
virtual bool canPaste() const;
|
||||||
virtual bool doCopy();
|
virtual bool doCopy();
|
||||||
virtual bool doPaste();
|
virtual bool doPaste();
|
||||||
|
virtual bool doDelete();
|
||||||
|
|
||||||
|
virtual bool onChar(wxKeyEvent&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Open the image slice window showing the give image
|
// Open the image slice window showing the give image
|
||||||
|
|||||||
Reference in New Issue
Block a user