mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Enable/Disable Update Firmware button based on dc
Disable the Update Firmware button if you choose a device that we don't support update firmware for. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									40bc4b629a
								
							
						
					
					
						commit
						3785c76657
					
				
					 2 changed files with 5 additions and 0 deletions
				
			
		|  | @ -537,10 +537,12 @@ void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int curr | ||||||
| 	case 0: | 	case 0: | ||||||
| 		selected_vendor = "Heinrichs Weikamp"; | 		selected_vendor = "Heinrichs Weikamp"; | ||||||
| 		selected_product = "OSTC 3"; | 		selected_product = "OSTC 3"; | ||||||
|  | 		ui->updateFirmwareButton->setEnabled(true); | ||||||
| 		break; | 		break; | ||||||
| 	case 1: | 	case 1: | ||||||
| 		selected_vendor = "Suunto"; | 		selected_vendor = "Suunto"; | ||||||
| 		selected_product = "Vyper"; | 		selected_product = "Vyper"; | ||||||
|  | 		ui->updateFirmwareButton->setEnabled(false); | ||||||
| 		break; | 		break; | ||||||
| 	default: | 	default: | ||||||
| 		/* Not Supported */ | 		/* Not Supported */ | ||||||
|  |  | ||||||
|  | @ -103,6 +103,9 @@ | ||||||
|      </item> |      </item> | ||||||
|      <item> |      <item> | ||||||
|       <widget class="QPushButton" name="updateFirmwareButton"> |       <widget class="QPushButton" name="updateFirmwareButton"> | ||||||
|  |        <property name="enabled"> | ||||||
|  |         <bool>false</bool> | ||||||
|  |        </property> | ||||||
|        <property name="text"> |        <property name="text"> | ||||||
|         <string>Update firmware</string> |         <string>Update firmware</string> | ||||||
|        </property> |        </property> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue