mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Merge pull request #19 from G-e-n-e-v-e-n-s-i-S/remove-editable-text
Remove text on editable:false image fields
This commit is contained in:
@@ -43,7 +43,7 @@ void ImageValueViewer::draw(RotatedDC& dc) {
|
|||||||
image = style().default_image.generate(GeneratedImage::Options(w, h, &getStylePackage(), &getLocalPackage()));
|
image = style().default_image.generate(GeneratedImage::Options(w, h, &getStylePackage(), &getLocalPackage()));
|
||||||
is_default = true;
|
is_default = true;
|
||||||
if (what & DRAW_EDITING) {
|
if (what & DRAW_EDITING) {
|
||||||
bitmap = imagePlaceholder(dc, w, h, image, what & DRAW_EDITING);
|
bitmap = imagePlaceholder(dc, w, h, image, (what & DRAW_EDITING) && field().editable);
|
||||||
if (alpha_mask.isLoaded() || !is_rad0(a)) {
|
if (alpha_mask.isLoaded() || !is_rad0(a)) {
|
||||||
image = bitmap.ConvertToImage(); // we need to convert back to an image
|
image = bitmap.ConvertToImage(); // we need to convert back to an image
|
||||||
} else {
|
} else {
|
||||||
@@ -54,7 +54,7 @@ void ImageValueViewer::draw(RotatedDC& dc) {
|
|||||||
// checkerboard placeholder
|
// checkerboard placeholder
|
||||||
if (!image.Ok() && !bitmap.Ok() && style().width > 40) {
|
if (!image.Ok() && !bitmap.Ok() && style().width > 40) {
|
||||||
// placeholder bitmap
|
// placeholder bitmap
|
||||||
bitmap = imagePlaceholder(dc, w, h, wxNullImage, what & DRAW_EDITING);
|
bitmap = imagePlaceholder(dc, w, h, wxNullImage, (what & DRAW_EDITING) && field().editable);
|
||||||
if (alpha_mask.isLoaded() || !is_rad0(a)) {
|
if (alpha_mask.isLoaded() || !is_rad0(a)) {
|
||||||
// we need to convert back to an image
|
// we need to convert back to an image
|
||||||
image = bitmap.ConvertToImage();
|
image = bitmap.ConvertToImage();
|
||||||
|
|||||||
Reference in New Issue
Block a user