Fixed: CardViewers fighting over styles when multiple windows are open

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1184 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-31 00:07:30 +00:00
parent a2af3211a4
commit dc0fee0369
7 changed files with 11 additions and 12 deletions
+5 -2
View File
@@ -37,7 +37,10 @@ wxSize CardViewer::DoGetBestSize() const {
}
void CardViewer::redraw(const ValueViewer& v) {
if (drawing) return;
// Don't refresh if we OR ANOTHER CardViewer is drawing
// drawing another viewer causes styles to be updated for its active card, which may be different,
// causing the two viewers to continously refresh.
if (drawing_card()) return;
up_to_date = false;
RefreshRect(getRotation().trRectToBB(v.boundingBox()), false);
}
@@ -47,7 +50,7 @@ void CardViewer::onChange() {
}
void CardViewer::redraw() {
if (drawing) return;
if (drawing_card()) return;
up_to_date = false;
Refresh(false);
}