Skip to content

Commit

Permalink
Lib:
Browse files Browse the repository at this point in the history
- Examining certain objs wouldn't open child examine below parent examine.

[email protected]
  • Loading branch information
ChoGGi committed Aug 31, 2024
1 parent 5d3b637 commit 0905b1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions ChoGGi's Library/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Library Changelog

## v12.3 (Unreleased)
- Examining certain objs wouldn't open child examine below parent examine.

## v12.2 (4 Aug 2024)
- Split ChoGGi funcs into their own table for localing.
Expand Down
8 changes: 3 additions & 5 deletions ChoGGi's Library/Code/Dialogs/Examine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ DefineClass.ChoGGi_DlgExamine = {
obj = false,
-- sent by examine func
varargs = false,
-- all examine dlgs open by another dlg will have the same id (batch close)
-- all examine dlgs opened by another dlg will have the same id (batch close)
parent_id = false,
-- whatever RetName is
name = false,
Expand Down Expand Up @@ -653,7 +653,7 @@ If it's an associative table then o = value."]]),
end

-- do the magic
if self:SetObj(true) and not self.obj_ref:IsKindOf("InGameInterface") then
if self:SetObj(true) and not IsKindOf(self.obj_ref, "InGameInterface") then
self:FlashWindow()
end

Expand Down Expand Up @@ -1580,7 +1580,6 @@ function ChoGGi_DlgExamine:BuildToolsMenuPopup()
if not self.menu_added.Object and self.menu_added.CObject then
self:BuildFuncList("CObject", self.menu_added.CObject)
end

ChoGGi_Funcs.Common.OpenInExamineDlg(self.menu_list_items, {
has_params = true,
parent = self,
Expand Down Expand Up @@ -2478,7 +2477,6 @@ local function Examine_ConvertValueToInfo(self, button, obj, _, _, _, link)
-- needed for index tables
title = tostring(self.onclick_objs[link-1])
end

ChoGGi_Funcs.Common.OpenInExamineDlg(obj, {
has_params = true,
parent = self,
Expand Down Expand Up @@ -4119,8 +4117,8 @@ end

function ChoGGi_Funcs.Common.OpenInExamineDlg(obj, parent, title, ...)
local params, parent_type
params, parent, parent_type = RetParamsParents(parent, params, ...)

params, parent, parent_type = RetParamsParents(parent, params, ...)
-- preserve the orig params
params.obj = obj
if parent then
Expand Down

0 comments on commit 0905b1c

Please sign in to comment.