mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-05 03:48:44 -06:00
patterns: Limit max number of patterns
Can be overriden with the pattern_limit pragma Further improves situation with #313
This commit is contained in:
@@ -259,12 +259,23 @@ namespace hex {
|
||||
ImGui::SameLine();
|
||||
if (this->m_evaluatorRunning)
|
||||
ImGui::TextSpinner("hex.view.pattern.evaluating"_lang);
|
||||
else
|
||||
else {
|
||||
if (ImGui::Checkbox("hex.view.pattern.auto"_lang, &this->m_runAutomatically)) {
|
||||
if (this->m_runAutomatically)
|
||||
this->m_hasUnevaluatedChanges = true;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::TextUnformatted(hex::format("{} / {}",
|
||||
this->m_patternLanguageRuntime->getCreatedPatternCount(),
|
||||
this->m_patternLanguageRuntime->getMaximumPatternCount()
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
if (this->m_textEditor.IsTextChanged()) {
|
||||
ProjectFile::markDirty();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user