void ParticlesChooser::reloadParticles() { std::string prevSelection = _selectedParticle; populateParticleList(); // Try to select the previously selected particle again setSelectedParticle(prevSelection); }
// Enter recursive main loop void ParticlesChooser::showAndBlock(const std::string& current) { _selectedParticle.clear(); // Highlight the current particle setSelectedParticle(current); // Show and block show(); }
void ParticlesChooser::onTreeStorePopulationFinished(wxutil::TreeModel::PopulationFinishedEvent& ev) { _particlesList = ev.GetTreeModel(); // Replace the existing model with the new one _treeView->AssociateModel(_particlesList.get()); // Trigger auto-size calculation _particlesList->ItemChanged(_particlesList->GetRoot()); // Pre-select the given class if requested if (!_preSelectParticle.empty()) { setSelectedParticle(_preSelectParticle); } }