diff --git a/ChangeLog b/ChangeLog index ce434959..a1c7d3f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-10-20 Bart Hakvoort + + * src/Dialog_Base_Partition.cc (Get_New_Partition): Tweaked resizingbehaviour a bit. This solved some minor annoyances. + 2004-10-18 Bart Hakvoort * src/Dialog_Partition_New.cc: changed width of optionmenus from 150 to 160 pixels. (in certain langs the strings didn't fit) diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc index 8d7f0dd6..9bd69658 100644 --- a/src/Dialog_Base_Partition.cc +++ b/src/Dialog_Base_Partition.cc @@ -115,12 +115,12 @@ void Dialog_Base_Partition::Set_Resizer( bool extended ) } Partition Dialog_Base_Partition::Get_New_Partition() -{ - //no need to set the start of a fixed_start one ;-) - if ( ! fixed_start ) - selected_partition.sector_start = START + (Sector) spinbutton_before .get_value() * MEGABYTE ; +{ + if ( ORIG_BEFORE != spinbutton_before .get_value_as_int() ) + selected_partition .sector_start = START + (Sector) spinbutton_before .get_value() * MEGABYTE ; - selected_partition.sector_end = selected_partition.sector_start + (Sector) spinbutton_size.get_value() * MEGABYTE ; + if ( ORIG_AFTER != spinbutton_after .get_value_as_int() ) + selected_partition .sector_end = selected_partition .sector_start + (Sector) spinbutton_size .get_value() * MEGABYTE ; //due to loss of precision during calcs from Sector -> MB and back, it is possible the new partition thinks it's bigger then it can be. Here we solve this. if ( selected_partition.sector_start < START ) @@ -136,7 +136,7 @@ Partition Dialog_Base_Partition::Get_New_Partition() //set new value of unused.. if ( selected_partition .sectors_used != -1 ) - selected_partition .sectors_unused = ( selected_partition .sector_end - selected_partition .sector_start) - selected_partition .sectors_used ; + selected_partition .sectors_unused = ( selected_partition .sector_end - selected_partition .sector_start) - selected_partition .sectors_used ; return selected_partition ; }