[fix] fix recent connection deletion

This commit is contained in:
dijunkun
2025-04-27 10:53:44 +08:00
parent f7f8ddd925
commit 4b9e86c424
3 changed files with 4 additions and 2 deletions

View File

@@ -155,9 +155,10 @@ int Render::ShowRecentConnections() {
if (ImGui::Button(recent_connection_delete_button_name.c_str(),
ImVec2(button_width, button_height))) {
show_confirm_delete_connection_ = true;
delete_connection_name_ = it->first;
}
if (delete_connection_) {
if (delete_connection_ && delete_connection_name_ == it->first) {
if (!thumbnail_->DeleteThumbnail(it->first)) {
reload_recent_connections_ = true;
delete_connection_ = false;

View File

@@ -350,6 +350,7 @@ class Render {
bool reload_recent_connections_ = true;
bool show_confirm_delete_connection_ = false;
bool delete_connection_ = false;
std::string delete_connection_name_ = "";
bool re_enter_remote_id_ = false;
double copy_start_time_ = 0;
double regenerate_password_start_time_ = 0;