Choice images recomputed less often;

Implemented GraphType for choosing different layouts on the stats panel;
Added option to define order of graph groups;
Added busy cursor when loading recent file;
Parentheses in FOR_EACH macro

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@351 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-13 15:22:26 +00:00
parent cc036b94f3
commit 8d5fc6949f
11 changed files with 154 additions and 63 deletions
+9 -4
View File
@@ -164,6 +164,7 @@ ChoiceStyle::ChoiceStyle(const ChoiceFieldP& field)
: Style(field)
, popup_style(POPUP_DROPDOWN)
, render_style(RENDER_TEXT)
, choice_images_initialized(false)
, combine(COMBINE_NORMAL)
, alignment(ALIGN_STRETCH)
, angle(0)
@@ -179,10 +180,14 @@ bool ChoiceStyle::update(Context& ctx) {
// Don't update the choice images, leave that to invalidate()
bool change = Style ::update(ctx)
| mask_filename.update(ctx);
FOR_EACH(ci, choice_images) {
if (ci.second.update(ctx)) {
change = true;
// TODO : remove this thumbnail
if (!choice_images_initialized) {
// we only want to do this once because it is rather slow, other updates are handled by dependencies
choice_images_initialized = true;
FOR_EACH(ci, choice_images) {
if (ci.second.update(ctx)) {
change = true;
// TODO : remove this thumbnail
}
}
}
return change;