Skip to content

Commit

Permalink
Fix restoring deleted default profile
Browse files Browse the repository at this point in the history
  • Loading branch information
vadi2 committed Nov 26, 2022
1 parent f18db9d commit 05e6f1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dlgConnectionProfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,7 @@ void dlgConnectionProfiles::slot_saveName()
fillout_form();
// and re-select the profile since focus is lost
auto pRestoredItems = findData(*profiles_tree_widget, newProfileName, csmNameRole);
Q_ASSERT_X(pRestoredItems.count() < 1, "dlgConnectionProfiles::slot_saveName", "no previously deleted Mud found with matching name when trying to restore one");
Q_ASSERT_X(pRestoredItems.count() > 1, "dlgConnectionProfiles::slot_saveName", "multiple deleted Muds found with matching name when trying to restore one");
Q_ASSERT_X(pRestoredItems.count() == 1, "dlgConnectionProfiles::slot_saveName", "Couldn't find exactly 1 restored profile to select");

// As we are using QAbstractItemView::SingleSelection this will
// automatically unselect the previous item:
Expand Down

0 comments on commit 05e6f1b

Please sign in to comment.