mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
sys: Fixed file modification detection
This commit is contained in:
@@ -57,7 +57,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
bool ProjectFile::store(std::string_view filePath) {
|
||||
ProjectFile::s_hasUnsavedChanged = false;
|
||||
EventManager::post<EventProjectFileStore>();
|
||||
|
||||
json projectFileData;
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace hex {
|
||||
return false;
|
||||
}
|
||||
|
||||
ProjectFile::s_hasUnsavedChanged = false;
|
||||
ProjectFile::s_currProjectFilePath = filePath;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -70,6 +70,8 @@ namespace hex {
|
||||
}
|
||||
|
||||
this->m_links.erase(link);
|
||||
|
||||
ProjectFile::markDirty();
|
||||
}
|
||||
|
||||
void ViewDataProcessor::eraseNodes(const std::vector<int> &ids) {
|
||||
@@ -95,6 +97,8 @@ namespace hex {
|
||||
|
||||
this->m_nodes.erase(node);
|
||||
}
|
||||
|
||||
ProjectFile::markDirty();
|
||||
}
|
||||
|
||||
void ViewDataProcessor::processNodes() {
|
||||
@@ -181,11 +185,13 @@ namespace hex {
|
||||
} else if (unlocalizedCategory.empty()) {
|
||||
if (ImGui::MenuItem(LangEntry(unlocalizedName))) {
|
||||
node = function();
|
||||
ProjectFile::markDirty();
|
||||
}
|
||||
} else {
|
||||
if (ImGui::BeginMenu(LangEntry(unlocalizedCategory))) {
|
||||
if (ImGui::MenuItem(LangEntry(unlocalizedName))) {
|
||||
node = function();
|
||||
ProjectFile::markDirty();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
#include <imgui_imhex_extensions.h>
|
||||
#include <implot.h>
|
||||
#include <implot_internal.h>
|
||||
#include <imnodes.h>
|
||||
#include <imnodes_internal.h>
|
||||
|
||||
#include <fontawesome_font.h>
|
||||
#include <codicons_font.h>
|
||||
|
||||
#include "helpers/plugin_manager.hpp"
|
||||
#include "helpers/project_file_handler.hpp"
|
||||
#include "init/tasks.hpp"
|
||||
|
||||
#include <glad/glad.h>
|
||||
|
||||
Reference in New Issue
Block a user