mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-19 01:34:08 +01:00
Internals: Settings: amend ClearWindowSettings() for Docking.
This commit is contained in:
parent
ea4565368e
commit
345184330b
@ -13382,11 +13382,14 @@ ImGuiWindowSettings* ImGui::FindWindowSettingsByWindow(ImGuiWindow* window)
|
||||
void ImGui::ClearWindowSettings(const char* name)
|
||||
{
|
||||
//IMGUI_DEBUG_LOG("ClearWindowSettings('%s')\n", name);
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = FindWindowByName(name);
|
||||
if (window != NULL)
|
||||
{
|
||||
window->Flags |= ImGuiWindowFlags_NoSavedSettings;
|
||||
InitOrLoadWindowSettings(window, NULL);
|
||||
if (window->DockId != 0)
|
||||
DockContextProcessUndockWindow(&g, window, true);
|
||||
}
|
||||
if (ImGuiWindowSettings* settings = window ? FindWindowSettingsByWindow(window) : FindWindowSettingsByID(ImHashStr(name)))
|
||||
settings->WantDelete = true;
|
||||
@ -14623,8 +14626,6 @@ namespace ImGui
|
||||
static void DockContextRemoveNode(ImGuiContext* ctx, ImGuiDockNode* node, bool merge_sibling_into_parent_node);
|
||||
static void DockContextQueueNotifyRemovedNode(ImGuiContext* ctx, ImGuiDockNode* node);
|
||||
static void DockContextProcessDock(ImGuiContext* ctx, ImGuiDockRequest* req);
|
||||
static void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true);
|
||||
static void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);
|
||||
static void DockContextPruneUnusedSettingsNodes(ImGuiContext* ctx);
|
||||
static ImGuiDockNode* DockContextBindNodeToWindow(ImGuiContext* ctx, ImGuiWindow* window);
|
||||
static void DockContextBuildNodesFromSettings(ImGuiContext* ctx, ImGuiDockNodeSettings* node_settings_array, int node_settings_count);
|
||||
|
@ -3196,6 +3196,8 @@ namespace ImGui
|
||||
IMGUI_API void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer);
|
||||
IMGUI_API void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window);
|
||||
IMGUI_API void DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);
|
||||
IMGUI_API void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true);
|
||||
IMGUI_API void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);
|
||||
IMGUI_API bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos);
|
||||
IMGUI_API ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id);
|
||||
IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode* node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user