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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user