Compare commits

...

2 Commits

Author SHA1 Message Date
WerWolv c90aa0a742 fix: Crash after evaluating patterns a second time 2022-11-10 11:18:14 +01:00
WerWolv 7f0bdea212 fix: Opening multiple files by dragging them onto the window 2022-11-10 11:17:21 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -636,9 +636,6 @@ namespace hex {
});
glfwSetDropCallback(this->m_window, [](GLFWwindow *, int count, const char **paths) {
if (count != 1)
return;
for (int i = 0; i < count; i++) {
auto path = std::fs::path(reinterpret_cast<const char8_t *>(paths[i]));

View File

@ -520,6 +520,9 @@ namespace hex::plugin::builtin::ui {
auto sortSpecs = ImGui::TableGetSortSpecs();
if (patterns.empty())
sortedPatterns.clear();
if (!patterns.empty() && (sortSpecs->SpecsDirty || sortedPatterns.empty())) {
sortedPatterns.clear();
std::transform(patterns.begin(), patterns.end(), std::back_inserter(sortedPatterns), [](const std::shared_ptr<pl::ptrn::Pattern> &pattern) {