mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user