Tweaked resizingbehaviour a bit. This solved some minor annoyances.
* src/Dialog_Base_Partition.cc (Get_New_Partition): Tweaked resizingbehaviour a bit. This solved some minor annoyances.
This commit is contained in:
parent
dcdc16ff78
commit
641c4504bf
|
@ -1,3 +1,7 @@
|
|||
2004-10-20 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/Dialog_Base_Partition.cc (Get_New_Partition): Tweaked resizingbehaviour a bit. This solved some minor annoyances.
|
||||
|
||||
2004-10-18 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/Dialog_Partition_New.cc: changed width of optionmenus from 150 to 160 pixels. (in certain langs the strings didn't fit)
|
||||
|
|
|
@ -116,11 +116,11 @@ 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 ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue