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
+4 -3
View File
@@ -23,11 +23,13 @@ DECLARE_TYPEOF_NO_REV(IndexMap<FieldP COMMA StyleP>);
// ----------------------------------------------------------------------------- : DataViewer
DataViewer::DataViewer() : drawing(false) {}
DataViewer::DataViewer() {}
DataViewer::~DataViewer() {}
// ----------------------------------------------------------------------------- : Drawing
IMPLEMENT_DYNAMIC_ARG(bool, drawing_card, false);
void DataViewer::draw(DC& dc) {
StyleSheetSettings& ss = settings.stylesheetSettingsFor(*stylesheet);
RotatedDC rdc(dc, getRotation(),
@@ -36,7 +38,7 @@ void DataViewer::draw(DC& dc) {
}
void DataViewer::draw(RotatedDC& dc, const Color& background) {
if (!set) return; // no set specified, don't draw anything
drawing = true;
WITH_DYNAMIC_ARG(drawing_card, true);
// fill with background color
clearDC(dc.getDC(), background);
// update style scripts
@@ -69,7 +71,6 @@ void DataViewer::draw(RotatedDC& dc, const Color& background) {
}
}
}
drawing = false;
}
void DataViewer::drawViewer(RotatedDC& dc, ValueViewer& v) {
v.draw(dc);