Don't update map if it really didn't change
This commit is contained in:
parent
88e9d912a2
commit
bde066af06
@ -431,6 +431,9 @@ impl Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn change_map_selection(&mut self, map_idx: u8, emit: bool) {
|
pub fn change_map_selection(&mut self, map_idx: u8, emit: bool) {
|
||||||
|
if self.selected_map_idx == map_idx {
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.selected_map_idx = map_idx;
|
self.selected_map_idx = map_idx;
|
||||||
if let Some(map) = self.maps.get(map_idx as usize) {
|
if let Some(map) = self.maps.get(map_idx as usize) {
|
||||||
self.selected_map = Some(map);
|
self.selected_map = Some(map);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user