mirror of
				https://github.com/keepassxreboot/keepassxc.git
				synced 2025-10-30 14:09:14 -04:00 
			
		
		
		
	Fix DatabaseTabWidget::lockDatabases returns false even when all tabs are locked
This commit is contained in:
		
							parent
							
								
									443614a375
								
							
						
					
					
						commit
						1fbddf4149
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -627,7 +627,8 @@ DatabaseWidget* DatabaseTabWidget::currentDatabaseWidget() | |||
| bool DatabaseTabWidget::lockDatabases() | ||||
| { | ||||
|     int numLocked = 0; | ||||
|     for (int i = 0, c = count(); i < c; ++i) { | ||||
|     int c = count(); | ||||
|     for (int i = 0; i < c; ++i) { | ||||
|         auto dbWidget = databaseWidgetFromIndex(i); | ||||
|         if (dbWidget->lock()) { | ||||
|             ++numLocked; | ||||
|  | @ -638,7 +639,7 @@ bool DatabaseTabWidget::lockDatabases() | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     return numLocked == count(); | ||||
|     return numLocked == c; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aetf
						Aetf