Skip to content

Commit

Permalink
Merge pull request #460 from Aspect12/master
Browse files Browse the repository at this point in the history
Chatbox Tab renaming fixes.
  • Loading branch information
alexgrist authored Oct 22, 2024
2 parents 96a6bbf + 5db0abd commit fbbdc6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion plugins/chatbox/derma/cl_chatbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function PANEL:AddTab(id, filter)
panel:SetFilter(filter or {})

button.DoRightClick = function(this)
ix.gui.chat:OnTabRightClick(this, panel, id)
ix.gui.chat:OnTabRightClick(this, panel, panel:GetID())
end

self.tabs[id] = panel
Expand Down Expand Up @@ -209,8 +209,14 @@ function PANEL:RenameTab(id, newID)
tab:GetButton():SetText(newID)
tab:GetButton():SizeToContents()

tab:SetID(newID)

self.tabs[id] = nil
self.tabs[newID] = tab

if (id == self:GetActiveTabID()) then
self:SetActiveTab(newID)
end
end

function PANEL:SetActiveTab(id)
Expand Down
2 changes: 1 addition & 1 deletion plugins/chatbox/derma/cl_chatboxcustomize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ end
function PANEL:CreateClicked()
local name = self.tab and self.tab or self.name:GetValue()

if (self.tab != self.name:GetValue() and PLUGIN:TabExists(name)) then
if (self.tab != self.name:GetValue() and PLUGIN:TabExists(self.name:GetValue())) then
ix.util.Notify(L("chatTabExists"))
return
end
Expand Down

0 comments on commit fbbdc6a

Please sign in to comment.