Fixed thumbnails for choices without images

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@391 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-18 22:37:50 +00:00
parent e9597a142c
commit 7230a79d85
2 changed files with 16 additions and 15 deletions
+3 -1
View File
@@ -43,7 +43,9 @@ Image ChoiceThumbnailRequest::generate() {
ChoiceValueEditor& cve = *(ChoiceValueEditor*)owner;
String name = cannocial_name_form(cve.field().choices->choiceName(id));
ScriptableImage& img = cve.style().choice_images[name];
return img.generate(GeneratedImage::Options(16,16, stylesheet.get(), &cve.getSet(), ASPECT_BORDER, true), false);
return img.isReady()
? img.generate(GeneratedImage::Options(16,16, stylesheet.get(), &cve.getSet(), ASPECT_BORDER, true), false)
: wxImage();
}
void ChoiceThumbnailRequest::store(const Image& img) {