mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 10:31:01 +01:00
fix: a deleted model is no longer the picked node, an orthophoto tile isn't swept as a grey stub, the ED brake arrays freed
Deleting a model in the editor left the renderer holding it as the picked node, the next pick used freed memory: the renderer forgets it now (Forget_Node). A texture filled straight from memory (internalsrc:) can't be read again, released by the garbage sweep it came back grey; it stays now, and the units bound with the old name are rebound. The arrays of the ED brake force sharing are vectors, they leaked once per update. The scene hierarchy and the editor menu items go through the translation. Python caches ignored.
This commit is contained in:
@@ -567,7 +567,7 @@ void ui_layer::render_hierarchy(){
|
||||
// fitted to the contents when it first appears; no auto resize, which a docked window can't do
|
||||
ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiCond_FirstUseEver);
|
||||
ImGui::Begin((std::string(STR_C("Scene Hierarchy")) + "###scenehierarchy").c_str(), &m_editor_hierarchy);
|
||||
ImGui::Text("Registered nodes: %zu", scene::Hierarchy.size());
|
||||
ImGui::Text(STR_C("Registered nodes: %zu"), scene::Hierarchy.size());
|
||||
ImGui::BeginChild("hierarchy_list", ImVec2(500, 300), true);
|
||||
|
||||
for (auto &entry : scene::Hierarchy)
|
||||
@@ -598,7 +598,7 @@ void ui_layer::render_hierarchy(){
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::SetTooltip("UUID: %s\nNode type: %s", uuid.c_str(), typeid(*node).name());
|
||||
ImGui::SetTooltip(STR_C("UUID: %s\nNode type: %s"),uuid.c_str(), typeid(*node).name());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,14 +708,14 @@ void ui_layer::render_menu_contents()
|
||||
GfxRenderer->Debug_Ui_State(ret);
|
||||
}
|
||||
if(EditorModeFlag){
|
||||
ImGui::MenuItem("Hierarchy", nullptr, &m_editor_hierarchy);
|
||||
ImGui::MenuItem(STR_C("Scene Hierarchy"), nullptr, &m_editor_hierarchy);
|
||||
bool change_history_enabled = editor_mode::change_history();
|
||||
if (ImGui::MenuItem("Change History", nullptr, &change_history_enabled))
|
||||
if (ImGui::MenuItem(STR_C("Change History"), nullptr, &change_history_enabled))
|
||||
{
|
||||
editor_mode::set_change_history(change_history_enabled);
|
||||
}
|
||||
bool settings_open = editor_mode::settings_open();
|
||||
if (ImGui::MenuItem("Editor Settings", nullptr, &settings_open))
|
||||
if (ImGui::MenuItem(STR_C("Editor Settings"), nullptr, &settings_open))
|
||||
{
|
||||
editor_mode::set_settings_open(settings_open);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user