File tree 1 file changed +25
-26
lines changed
1 file changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -137,45 +137,44 @@ bool FileChooser::Draw()
137
137
}
138
138
139
139
ImGui::EndListBox ();
140
+ }
140
141
141
- ImGui::PushStyleColor (ImGuiCol_Button, 0xFF000080 );
142
- if (ImGui::Button (" Cancel" ))
142
+ ImGui::PushStyleColor (ImGuiCol_Button, 0xFF000080 );
143
+ if (ImGui::Button (" Cancel" ))
144
+ {
145
+ _selectedFiles.clear ();
146
+ fileSelected = true ;
147
+ Close ();
148
+ }
149
+ ImGui::PopStyleColor ();
150
+ ImGui::SameLine ();
151
+ if (ImGui::Button (" Select" ))
152
+ {
153
+ for (auto index : _selectedFileIndices)
143
154
{
144
- _selectedFiles.clear ();
145
- fileSelected = true ;
146
- Close ();
155
+ _selectedFiles.emplace_back (_currentFileList.at (index ));
147
156
}
148
- ImGui::PopStyleColor ();
149
- ImGui::SameLine ();
150
- if (ImGui::Button (" Select" ))
151
- {
152
- for (auto index : _selectedFileIndices)
153
- {
154
- _selectedFiles.emplace_back (_currentFileList.at (index ));
155
- }
156
157
157
- if (_selectedFileIndices.empty () && _mode == Mode::Directory)
158
- {
159
- _selectedFiles.emplace_back (Poco::Path (_currentDir).makeDirectory ());
160
- }
161
- else
162
- {
163
- // ToDo: Display "Select at least one entry from the list"
164
- }
165
-
166
- fileSelected = true ;
167
- Close ();
158
+ if (_selectedFileIndices.empty () && _mode == Mode::Directory)
159
+ {
160
+ _selectedFiles.emplace_back (Poco::Path (_currentDir).makeDirectory ());
161
+ }
162
+ else
163
+ {
164
+ // ToDo: Display "Select at least one entry from the list"
168
165
}
169
166
170
- ImGui::EndPopup ();
167
+ fileSelected = true ;
168
+ Close ();
171
169
}
170
+
171
+ ImGui::EndPopup ();
172
172
}
173
173
else
174
174
{
175
175
Close ();
176
176
}
177
177
178
-
179
178
return fileSelected;
180
179
}
181
180
You can’t perform that action at this time.
0 commit comments