Fixed a bug where sector buttons would not be updated after abandoning it (#301)
This commit is contained in:
@@ -107,7 +107,11 @@ public class SectorsDialog extends FloatingDialog{
|
|||||||
|
|
||||||
if(selected.hasSave()){
|
if(selected.hasSave()){
|
||||||
t.addImageTextButton("$text.sector.abandon", "icon-cancel", 16 * 2, () ->
|
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);
|
).width(sectorSize).height(60f);
|
||||||
}
|
}
|
||||||
}).pad(-5).growX().padTop(0);
|
}).pad(-5).growX().padTop(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user