Skip to content

Commit

Permalink
Fix #896: display-only pools weren't displaying correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwilkes committed Nov 19, 2024
1 parent 96b9eb6 commit 094c4ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ux/attr_def_settings_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (p *attrDefSettingsPanel) createContent() *unison.Panel {
field.Tooltip = newWrappedTooltip(i18n.Text("The base value, which may be a number or a formula"))
content.AddChild(field)

if p.def.Type != attribute.IntegerRef && p.def.Type != attribute.DecimalRef {
if p.def.Type != attribute.IntegerRef && p.def.Type != attribute.DecimalRef && p.def.Type != attribute.PoolRef {
addLabelAndDecimalField(content, p.dockable.targetMgr, p.def.KeyPrefix+"cost", i18n.Text("Cost per Point"),
i18n.Text("The cost per point difference from the base"), &p.def.CostPerPoint, 0, fxp.MaxBasePoints)

Expand Down
6 changes: 5 additions & 1 deletion ux/attr_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ func (a *AttrPanel) rebuild(attrs *gurps.AttributeDefs) {
}
a.rowStarts = append(a.rowStarts, len(a.Children()))
if a.kind == poolAttrKind {
a.AddChild(a.createPointsField(attr))
if def.Type != attribute.PoolRef {
a.AddChild(a.createPointsField(attr))
} else {
a.AddChild(unison.NewPanel())
}

var currentField *DecimalField
currentField = NewDecimalPageField(a.targetMgr, a.prefix+attr.AttrID+":cur",
Expand Down

0 comments on commit 094c4ad

Please sign in to comment.