private void OnCutImage(DomEventArgs ge)
{
// NB: bloomImages.js contains code that prevents us arriving here
// if our image is simply the placeholder flower
if(!_model.CanChangeImages())
{
MessageBox.Show(
LocalizationManager.GetString("EditTab.CantPasteImageLocked",
"Sorry, this book is locked down so that images cannot be changed."));
return;
}
var bookFolderPath = _model.CurrentBook.FolderPath;
if(CopyImageToClipboard(ge, bookFolderPath)) // returns 'true' if successful
{
// Replace current image with placeHolder.png
var path = Path.Combine(bookFolderPath, "placeHolder.png");
using(var palasoImage = PalasoImage.FromFileRobustly(path))
{
_model.ChangePicture(GetImageNode(ge), palasoImage, new NullProgress());
}
}
}