Skip to content

Remove server button not working (X connects to server instead of removing) #355

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

Closed
skillman623 opened this issue Jul 4, 2020 · 2 comments · Fixed by #361
Closed

Remove server button not working (X connects to server instead of removing) #355

skillman623 opened this issue Jul 4, 2020 · 2 comments · Fixed by #361
Labels
bug Something isn't working

Comments

@skillman623
Copy link

On the server list, the remove server button no longer functions.
I remember it functioning at one point.
Currently it connects to the server instead of removing it from the list.

OS Windows 10 home.
Graphics Nvidia.

@iceiix iceiix added the bug Something isn't working label Jul 4, 2020
@iceiix
Copy link
Owner

iceiix commented Jul 4, 2020

Confirmed, clicking "X" in the server list connects to the server on my system as well. "E" interestingly works as expected (edit). The buttons are highlighted correctly on mouseover, so this probably isn't a symptom of the mouse tracking issues (#334). Will have to regress to see when this broke.

Testing older commits, reproduces on:
4e9cda2
287fb3f

delete_entry in src/screen/server_list.rs:

// Delete entry button
let delete_entry = ui::ButtonBuilder::new()
.position(0.0, 0.0)
.size(25.0, 25.0)
.alignment(ui::VAttach::Bottom, ui::HAttach::Right)
.attach(&mut *back.borrow_mut());
{
let mut btn = delete_entry.borrow_mut();
let txt = ui::TextBuilder::new()
.text("X")
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.attach(&mut *btn);
btn.add_text(txt);
}

no btn.add_click_func, how did this work? Appears the click event is going through to the parent item (// Make whole entry interactable, ... .replace_screen(Box::new(super::connecting::Connecting::new(&address)));).

Workaround: manually edit servers.json to remove the server entry

@iceiix iceiix changed the title Remove server button not working Remove server button not working (X connects to server instead of removing) Jul 4, 2020
@iceiix iceiix linked a pull request Jul 4, 2020 that will close this issue
iceiix added a commit that referenced this issue Jul 5, 2020
Adds a delete_server screen to delete servers, handled by clicking
the "X" button on the server list, similar to the "E" button for edit_server.
@iceiix
Copy link
Owner

iceiix commented Dec 30, 2020

Thinkofname/steven#49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants