fix: Dirty projects on load. (#2649)

When a project is loaded it is set to dirty without any changes so that
it goes through the steps that patterns with changes go through. The fix
uses a different starting step that doesn't set the dirty flags when
changing providers or loading projects.
This commit is contained in:
paxcut
2026-02-09 20:21:51 -07:00
committed by GitHub
parent a5008722aa
commit 800a24b42e
5 changed files with 23 additions and 42 deletions

View File

@@ -56,9 +56,8 @@ namespace hex::plugin::builtin {
enum class DangerousFunctionPerms : u8 { Ask, Allow, Deny };
void drawHelpText() override;
void setWasInterrupted(bool wasInterrupted) { m_wasInterrupted = wasInterrupted; }
bool wasInterrupted() const { return m_wasInterrupted;}
void resetInterrupt() { m_wasInterrupted = false; m_interrupt = false;}
bool interrupted() const { return m_interrupt;}
void resetInterrupt() { m_interrupt = false;}
void interrupt() { m_interrupt = true; }
private:
@@ -112,10 +111,9 @@ namespace hex::plugin::builtin {
std::atomic<u32> m_runningHighlighters = 0;
PerProvider<bool> m_hasUnevaluatedChanges;
std::atomic<bool> m_changesWereParsed;
PerProvider<bool> m_hasUncoloredChanges;
std::atomic<bool> m_changesWereColored;
std::atomic<bool> m_wasInterrupted;
std::atomic<bool> m_changesWereParsed = false;
std::atomic<bool> m_changesWereColored = false;
std::atomic<bool> m_allStepsCompleted = false;
std::atomic<bool> m_interrupt;
std::chrono::time_point<std::chrono::steady_clock> m_lastEditorChangeTime;