mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Printing: insert placeholders in empty feilds
Don't leave fields empty, this may corrupt the layout, a better way is to insert placeholders for empty data, which also provides a better UX. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
This commit is contained in:
		
							parent
							
								
									d72ba4f15a
								
							
						
					
					
						commit
						06e2fab291
					
				
					 1 changed files with 14 additions and 2 deletions
				
			
		|  | @ -211,7 +211,7 @@ int Dive::rating() const | |||
| void Dive::put_divemaster() | ||||
| { | ||||
| 	if (!dive->divemaster) | ||||
| 		m_divemaster = ""; | ||||
| 		m_divemaster = "--"; | ||||
| 	else | ||||
| 		m_divemaster = dive->divemaster; | ||||
| } | ||||
|  | @ -227,6 +227,9 @@ void Dive::put_date_time() | |||
| void Dive::put_location() | ||||
| { | ||||
| 	m_location = QString::fromUtf8(get_dive_location(dive)); | ||||
| 	if (m_location.isEmpty()) { | ||||
| 		m_location = "--"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void Dive::put_depth() | ||||
|  | @ -242,7 +245,7 @@ void Dive::put_duration() | |||
| void Dive::put_buddy() | ||||
| { | ||||
| 	if (!dive->buddy) | ||||
| 		m_buddy = ""; | ||||
| 		m_buddy = "--"; | ||||
| 	else | ||||
| 		m_buddy = dive->buddy; | ||||
| } | ||||
|  | @ -251,11 +254,20 @@ void Dive::put_temp() | |||
| { | ||||
| 	m_airTemp = get_temperature_string(dive->airtemp, true); | ||||
| 	m_waterTemp = get_temperature_string(dive->watertemp, true); | ||||
| 	if (m_airTemp.isEmpty()) { | ||||
| 		m_airTemp = "--"; | ||||
| 	} | ||||
| 	if (m_waterTemp.isEmpty()) { | ||||
| 		m_waterTemp = "--"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void Dive::put_notes() | ||||
| { | ||||
| 	m_notes = QString::fromUtf8(dive->notes); | ||||
| 	if (m_notes.isEmpty()) { | ||||
| 		m_notes = "--"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void Dive::put_tags() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue