Fix bug with map settings changes getting carried over on delete

This commit is contained in:
Mitchell McCaffrey 2020-07-01 08:40:37 +10:00
parent 4942fd832f
commit a8c670359c
2 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,8 @@ function SelectMapModal({
async function handleMapRemove(id) { async function handleMapRemove(id) {
await removeMap(id); await removeMap(id);
setSelectedMapId(null); setSelectedMapId(null);
setMapSettingChanges({});
setMapStateSettingChanges({});
// Removed the map from the map screen if needed // Removed the map from the map screen if needed
if (currentMap && currentMap.id === selectedMapId) { if (currentMap && currentMap.id === selectedMapId) {
onMapChange(null, null); onMapChange(null, null);

View File

@ -96,6 +96,7 @@ function SelectTokensModal({ isOpen, onRequestClose }) {
async function handleTokenRemove(id) { async function handleTokenRemove(id) {
await removeToken(id); await removeToken(id);
setSelectedTokenId(null); setSelectedTokenId(null);
setTokenSettingChanges({});
} }
/** /**