Fixed a bug where sector buttons would not be updated after abandoning it (#301)

This commit is contained in:
Timmeey86
2018-11-04 09:22:15 -05:00
committed by Anuken
parent 64f2ee67b2
commit 48fdae754e
@@ -107,7 +107,11 @@ public class SectorsDialog extends FloatingDialog{
if(selected.hasSave()){
t.addImageTextButton("$text.sector.abandon", "icon-cancel", 16 * 2, () ->
Vars.ui.showConfirm("$text.confirm", "$text.sector.abandon.confirm", () -> world.sectors.abandonSector(selected))
Vars.ui.showConfirm("$text.confirm", "$text.sector.abandon.confirm", () -> {
world.sectors.abandonSector(selected);
// Simulate a sector selection so the buttons get updated.
selectSector(selected);
})
).width(sectorSize).height(60f);
}
}).pad(-5).growX().padTop(0);