From 5b4668822d451f8209157709e146cf9dd120bf04 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 16 May 2018 06:15:33 -0400 Subject: [PATCH] [partition] Also update combo box index when setting up - Avoids case where you edit a partition with a mountpoint set; previously, calling setText() would update the text but leave the selected index unchanged (usually 0), so that later calling selectedMountPoint() would return empty. --- src/modules/partition/gui/MountPoints.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/partition/gui/MountPoints.cpp b/src/modules/partition/gui/MountPoints.cpp index 4e6a762bc..612be3177 100644 --- a/src/modules/partition/gui/MountPoints.cpp +++ b/src/modules/partition/gui/MountPoints.cpp @@ -51,10 +51,7 @@ void standardMountPoints(QComboBox& combo, const QString& selected) { standardMountPoints( combo ); - if ( selected.isEmpty() ) - combo.setCurrentIndex( 0 ); - else - combo.setCurrentText( selected ); + setSelectedMountPoint( combo, selected ); } QString