bool EditPanel::CommandPaste(ImageInfoPtr newValue ) { if ( mImageInfo == NULL ) { return false; } wxRect zone( mCursor, newValue->GetSize() ); ImageInfoPtr old = mImageInfo->CopyToImageInfo( zone ); if (old) { ImagePasteCommand* paste = new ImagePasteCommand(this, old->Clone(), newValue->Clone(), mCursor ); return COMMAND->Submit( paste ); } return false; }
ImageInfoDataObject::ImageInfoDataObject( ImageInfoPtr info ): wxBitmapDataObject( *info->GetBitmap() ), mImageInfo( info->Clone() ) { }