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

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

Closed
Ermiq opened this issue Sep 7, 2023 · 0 comments · Fixed by #674
Closed

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

Ermiq opened this issue Sep 7, 2023 · 0 comments · Fixed by #674

Comments

@Ermiq
Copy link
Contributor

Ermiq commented Sep 7, 2023

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);
    }
}
@Ermiq Ermiq changed the title Fix the broken renameTab(...) in tabs.d Fix for the broken renameTab(...) in tabs.d Sep 7, 2023
GrimMaple pushed a commit that referenced this issue Sep 15, 2023
* fix #645, fix #673

Fix #673 where the function `renameTab(string ID, dstring name)` in `src/dlangui/widgets/tabs.d` failed to find the tab with the given id because it uses the `TabControl`'s own id due to the misuse of lower/upper case names. Changed the function's argument `ID` that have never been used to `id`.  
  
Fix #645 where `EditWidgetBase` doesn't scroll when mouse selection is active and the cursor goes beyond the widget boundaries. Now it scrolls.  
Additionally, added new type of `EditorActions` to make 2 different types of `EditorActions.ScrollLineUp/Down`. The old `ScrollLineUp/Down` made 3 lines scrolling and it doesn't work well with new mouse selection scrolling when out of bounds (scrolls too fast). So now there are `ScrollLineUp/DownSingle` and `ScrollLineUp/DownTriple`. The single one is used by the mouse selection scrolling, the triple one used in all other cases just like before.

* Original ScrollLineUp + ScrollLineUpSingle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant