mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	Highlight the current device
This commit is contained in:
		
							parent
							
								
									4538d46c5d
								
							
						
					
					
						commit
						c7c0247f81
					
				| @ -52,6 +52,7 @@ DeviceSetSelectionDialog::DeviceSetSelectionDialog(std::vector<DeviceUISet*>& de | ||||
|             m_deviceSetIndexes.push_back(i); | ||||
|         } | ||||
|     } | ||||
|     selectIndex(channelDeviceSetIndex); | ||||
| } | ||||
| 
 | ||||
| DeviceSetSelectionDialog::~DeviceSetSelectionDialog() | ||||
| @ -65,3 +66,14 @@ void DeviceSetSelectionDialog::accept() | ||||
|     m_hasChanged = true; | ||||
|     QDialog::accept(); | ||||
| } | ||||
| 
 | ||||
| void DeviceSetSelectionDialog::selectIndex(int channelDeviceSetIndex) | ||||
| { | ||||
|     for (int i = 0; i < (int) m_deviceSetIndexes.size(); i++) | ||||
|     { | ||||
|         if (channelDeviceSetIndex == m_deviceSetIndexes[i]) { | ||||
|             ui->workspaceList->setCurrentRow(i); | ||||
|             break; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -40,6 +40,7 @@ public: | ||||
| 
 | ||||
|     bool hasChanged() const { return m_hasChanged; } | ||||
|     int getSelectedIndex() const { return m_selectedDeviceSetIndex; } | ||||
|     void selectIndex(int channelDeviceSetIndex); | ||||
| 
 | ||||
| private: | ||||
|     Ui::WorkspaceSelectionDialog *ui; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user