@@ -108,12 +108,24 @@ private void UpdateInfo()
108108 ListBox_Patches . Items . Clear ( ) ;
109109 ListBox_Tweaks . Items . Clear ( ) ;
110110
111- string noneSelected = "Please select a profile..." ;
111+ string none = "N/A" ;
112+
113+ if ( ListView_ProfilesList . SelectedItems . Count == 0 )
114+ {
115+ string noneSelected = "Please select a profile..." ;
116+
117+ // No profile selected, so 'disable' preview
118+ ListBox_Mods . Items . Add ( noneSelected ) ;
119+ ListBox_Patches . Items . Add ( noneSelected ) ;
120+ ListBox_Tweaks . Items . Add ( noneSelected ) ;
121+
122+ return ;
123+ }
112124
113125 // Update mod info list box
114126 if ( Profile . Mods . Count == 0 )
115127 {
116- ListBox_Mods . Items . Add ( noneSelected ) ;
128+ ListBox_Mods . Items . Add ( none ) ;
117129 }
118130 else
119131 {
@@ -124,7 +136,7 @@ private void UpdateInfo()
124136 // Update patch info list box
125137 if ( Profile . Patches . Count == 0 )
126138 {
127- ListBox_Patches . Items . Add ( noneSelected ) ;
139+ ListBox_Patches . Items . Add ( none ) ;
128140 }
129141 else
130142 {
@@ -135,7 +147,7 @@ private void UpdateInfo()
135147 // Update tweak info list box
136148 if ( Profile . Tweaks . Count == 0 )
137149 {
138- ListBox_Tweaks . Items . Add ( noneSelected ) ;
150+ ListBox_Tweaks . Items . Add ( none ) ;
139151 }
140152 else
141153 {
0 commit comments