Skip to content

Commit

Permalink
Added some more empty-mapgroup-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lenosisnickerboa committed Jan 31, 2021
1 parent cffe15a commit 2f3e136
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/config_page.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ proc GetSelectedMaps {lbMaps} {
}

proc GetMapsFromSelectedMapGroup {mapGroup} {
if { "$mapGroup" == "" } {
return ""
}
global mapGroupsMapper
return [dict get $mapGroupsMapper $mapGroup]
}
Expand Down Expand Up @@ -794,8 +797,14 @@ proc ShowMapPreview {lbMaps} {

proc ClickedMapsListBox {lbMapGroups lbMaps} {
set selectedMapGroup [GetSelectedMapGroup $lbMapGroups]
if { "$selectedMapGroup" == "" } {
return
}
set selectedMapGroupIx [$lbMapGroups curselection]
set mapsFromSelectedMapGroup [GetMapsFromSelectedMapGroup $selectedMapGroup]
if { "$mapsFromSelectedMapGroup" == "" } {
return
}
set selectedMaps [GetSelectedMaps $lbMaps]
if { $mapsFromSelectedMapGroup != $selectedMaps } {
$lbMapGroups itemconfigure $selectedMapGroupIx -selectbackground red
Expand Down
2 changes: 1 addition & 1 deletion src/version.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# The next line is executed by /bin/sh, but not tcl \
exec wish "$0" ${1+"$@"}

set version "2.9.4"
set version "2.9.5"

0 comments on commit 2f3e136

Please sign in to comment.