Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatbox Tab renaming fixes. #460

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading