Ensure that standard slots are repainted when any component changes

This commit is contained in:
Cmdr McDonald
2017-02-08 10:09:30 +00:00
parent 9e5efe50dc
commit 24849cee08
3 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,6 @@
#2.2.15
* Ensure that standard slots are repainted when any component changes
#2.2.14 #2.2.14
* Ensure that jitter is shown correctly when the result of a special effect * Ensure that jitter is shown correctly when the result of a special effect
* Use restyled blueprint information * Use restyled blueprint information

View File

@@ -64,7 +64,7 @@ export default class SlotSection extends TranslatedComponent {
* @param {Object} m Selected module * @param {Object} m Selected module
*/ */
_selectModule(slot, m) { _selectModule(slot, m) {
this.props.ship.use(slot, m); this.props.ship.use(slot, m, false);
this.props.onChange(); this.props.onChange();
this._close(); this._close();
} }
@@ -123,7 +123,7 @@ export default class SlotSection extends TranslatedComponent {
// We want to copy the module in to the target slot // We want to copy the module in to the target slot
if (targetSlot && canMount(this.props.ship, targetSlot, m.grp, m.class)) { if (targetSlot && canMount(this.props.ship, targetSlot, m.grp, m.class)) {
const mCopy = m.clone(); const mCopy = m.clone();
this.props.ship.use(targetSlot, mCopy); this.props.ship.use(targetSlot, mCopy, false);
this.props.onChange(); this.props.onChange();
} }
} else { } else {

View File

@@ -316,7 +316,6 @@ export default class OutfittingPage extends Page {
canRename = buildName && newBuildName && buildName != newBuildName, canRename = buildName && newBuildName && buildName != newBuildName,
canReload = savedCode && canSave, canReload = savedCode && canSave,
hStr = ship.getHardpointsString() + '.' + ship.getModificationsString(), hStr = ship.getHardpointsString() + '.' + ship.getModificationsString(),
sStr = ship.getStandardString() + '.' + ship.getModificationsString(),
iStr = ship.getInternalString() + '.' + ship.getModificationsString(); iStr = ship.getInternalString() + '.' + ship.getModificationsString();
return ( return (
@@ -350,12 +349,12 @@ export default class OutfittingPage extends Page {
</div> </div>
<ShipSummaryTable ship={ship} code={code} /> <ShipSummaryTable ship={ship} code={code} />
<StandardSlotSection ship={ship} code={sStr} onChange={shipUpdated} currentMenu={menu} /> <StandardSlotSection ship={ship} code={code} onChange={shipUpdated} currentMenu={menu} />
<InternalSlotSection ship={ship} code={iStr} onChange={shipUpdated} currentMenu={menu} /> <InternalSlotSection ship={ship} code={iStr} onChange={shipUpdated} currentMenu={menu} />
<HardpointsSlotSection ship={ship} code={hStr} onChange={shipUpdated} currentMenu={menu} /> <HardpointsSlotSection ship={ship} code={hStr} onChange={shipUpdated} currentMenu={menu} />
<UtilitySlotSection ship={ship} code={hStr} onChange={shipUpdated} currentMenu={menu} /> <UtilitySlotSection ship={ship} code={hStr} onChange={shipUpdated} currentMenu={menu} />
<PowerManagement ship={ship} code={code} onChange={shipUpdated} /> <PowerManagement ship={ship} code={code} onChange={shipUpdated} />
<CostSection ship={ship} buildName={buildName} code={sStr + hStr + iStr} /> <CostSection ship={ship} buildName={buildName} code={code} />
<div className='group third'> <div className='group third'>
<OffenceSummary ship={ship} code={code}/> <OffenceSummary ship={ship} code={code}/>