buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
805 stars 120 forks source link

Fix for the broken renameTab(...) in tabs.d #673

Closed Ermiq closed 12 months ago

Ermiq commented 1 year ago

The function TabControl.renameTab(string ID, dstring name) (in /src/dlangui/widgets/tabs.d) fails to rename the tab because it can't find the tab with the given id.

void renameTab(string ID, dstring name) {
    int index = _items.indexById(id);    // <- this should be uppercase ID as in the arguments
    if (index >= 0) {
        renameTab(index, name);
    }
}