mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added thread-safety to thumbnail request system.
Marked symbol requests as not being thread-safe. Added icon to symbol editor Made *.* actually register on * git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@407 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -23,6 +23,9 @@ class ChoiceThumbnailRequest : public ThumbnailRequest {
|
||||
ChoiceThumbnailRequest(ValueViewer* cve, int id, bool from_disk);
|
||||
virtual Image generate();
|
||||
virtual void store(const Image&);
|
||||
|
||||
bool isThreadSafe;
|
||||
virtual bool threadSafe() const {return isThreadSafe;}
|
||||
private:
|
||||
StyleSheetP stylesheet;
|
||||
int id;
|
||||
@@ -37,7 +40,12 @@ ChoiceThumbnailRequest::ChoiceThumbnailRequest(ValueViewer* cve, int id, bool fr
|
||||
)
|
||||
, stylesheet(cve->viewer.stylesheet)
|
||||
, id(id)
|
||||
{}
|
||||
{
|
||||
ChoiceValueEditor& e = *(ChoiceValueEditor*)cve;
|
||||
String name = cannocial_name_form(e.field().choices->choiceName(id));
|
||||
ScriptableImage& img = e.style().choice_images[name];
|
||||
isThreadSafe = img.threadSafe();
|
||||
}
|
||||
|
||||
Image ChoiceThumbnailRequest::generate() {
|
||||
ChoiceValueEditor& cve = *(ChoiceValueEditor*)owner;
|
||||
|
||||
Reference in New Issue
Block a user