mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
New symbol part list control that shows previews and has a built in editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@529 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -94,6 +94,11 @@ Vector2D& ControlPoint::getOther(WhichHandle wh) {
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolPart
|
||||
|
||||
void SymbolPart::calculateBounds() {
|
||||
min_pos = Vector2D::infinity();
|
||||
max_pos = -Vector2D::infinity();
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(SymbolPart) {
|
||||
REFLECT_IF_NOT_READING {
|
||||
String type = typeName();
|
||||
@@ -235,6 +240,19 @@ SymbolPartP SymbolGroup::clone() const {
|
||||
return part;
|
||||
}
|
||||
|
||||
void SymbolGroup::calculateBounds() {
|
||||
FOR_EACH(p, parts) p->calculateBounds();
|
||||
calculateBoundsNonRec();
|
||||
}
|
||||
void SymbolGroup::calculateBoundsNonRec() {
|
||||
min_pos = Vector2D::infinity();
|
||||
max_pos = -Vector2D::infinity();
|
||||
FOR_EACH(p, parts) {
|
||||
min_pos = piecewise_min(min_pos, p->min_pos);
|
||||
max_pos = piecewise_max(max_pos, p->max_pos);
|
||||
}
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(SymbolGroup) {
|
||||
REFLECT_BASE(SymbolPart);
|
||||
REFLECT(parts);
|
||||
|
||||
Reference in New Issue
Block a user