| 158 | } |
| 159 | |
| 160 | void SFlowPalette::Refresh() |
| 161 | { |
| 162 | const FString LastSelectedCategory = CategoryComboBox->GetSelectedItem().IsValid() ? *CategoryComboBox->GetSelectedItem().Get() : FString(); |
| 163 | |
| 164 | UpdateCategoryNames(); |
| 165 | RefreshActionsList(true); |
| 166 | |
| 167 | // refresh list of category and currently selected category |
| 168 | CategoryComboBox->RefreshOptions(); |
| 169 | TSharedPtr<FString> SelectedCategory = CategoryNames[0]; |
| 170 | if (!LastSelectedCategory.IsEmpty()) |
| 171 | { |
| 172 | for (const TSharedPtr<FString>& CategoryName : CategoryNames) |
| 173 | { |
| 174 | if (*CategoryName.Get() == LastSelectedCategory) |
| 175 | { |
| 176 | SelectedCategory = CategoryName; |
| 177 | break; |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | CategoryComboBox->SetSelectedItem(SelectedCategory); |
| 182 | } |
| 183 | |
| 184 | void SFlowPalette::UpdateCategoryNames() |
| 185 | { |