mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
fix: File changed popup showing up when saving memory mapped file
This commit is contained in:
@@ -68,6 +68,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
void FileProvider::save() {
|
||||
if (m_loadedIntoMemory) {
|
||||
m_ignoreNextChangeEvent = true;
|
||||
m_file.open();
|
||||
m_file.writeVectorAtomic(0x00, m_data);
|
||||
m_file.setSize(m_data.size());
|
||||
@@ -333,6 +334,11 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void FileProvider::handleFileChange() {
|
||||
if (m_ignoreNextChangeEvent) {
|
||||
m_ignoreNextChangeEvent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
ui::PopupQuestion::open("hex.builtin.provider.file.reload_changes"_lang, [this] {
|
||||
this->close();
|
||||
(void)this->open();
|
||||
|
||||
Reference in New Issue
Block a user