Skip to content

Commit

Permalink
Password would get erased when opening settings.
Browse files Browse the repository at this point in the history
HideTyping clears the text view content, so we need to set the password
after enabling it.
  • Loading branch information
pulkomandy committed Aug 12, 2017
1 parent 18c4ccf commit eb5b9ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ServerEntryWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ ServerEntryWindow::ServerEntryWindow(BHandler* handler, BMessage* invoked,
usePassword->SetValue((strlen(currentServer.password) > 0) ? B_CONTROL_ON : B_CONTROL_OFF);
passwordField->SetEnabled(usePassword->Value() == B_CONTROL_ON);
passwordField->TextView()->HideTyping(true);
// HideTyping erases the text from the field, so set the password only now.
passwordField->TextView()->SetText(password.String());

securePort->SetTarget(this);
securePort->SetValue(currentServer.secure ? B_CONTROL_ON : B_CONTROL_OFF);
Expand Down

0 comments on commit eb5b9ff

Please sign in to comment.