[gparted] Remove unnecessary call to combobox_changed(false)



commit eb5ad50fef65023fdc9c7fd391fe5b69997fee3d
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Feb 28 14:21:56 2021 +0000

    Remove unnecessary call to combobox_changed(false)
    
    ... in Dialog_Partition_New::set_data().  As the change signal for
    combo_filesystem has already been connected, combo_changed(false) is
    automatically called by setting the active selection.  Therefore remove
    the unnecessary call.

 src/Dialog_Partition_New.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index f3210d63..0be9db43 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -177,10 +177,12 @@ void Dialog_Partition_New::set_data( const Device & device,
        TOTAL_MB = Utils::round( Utils::sector_to_unit( selected_partition.get_sector_length(),
                                                        selected_partition.sector_size, UNIT_MIB ) );
        MB_PER_PIXEL = TOTAL_MB / 500.00 ;
-       
-       //set first enabled file system
+
+       // Set default creatable file system.
+       // (As the change signal for combo_filesystem has already been connected,
+       // combobox_changed(false) is automatically called by setting the active
+       // selection.  This is needed to initialise everything correctly).
        combo_filesystem.set_active(first_creatable_fs);
-       combobox_changed(false);
 
        //set spinbuttons initial values
        spinbutton_after .set_value( 0 ) ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]