mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Undo: implement undo of tag editing
The code follows the other edit-commands, but uses its own base class, because it is distinctly different. Editing the tag field does not simply mean setting the tag for all dives, but rather adding and removing individual tags. This class will be reused for editing of dive buddies and masters. Modify the tag widget thus that it sends an editingFinished() signal when it goes out of focus. The editingFinished() signal was prevented by hooking into the return, enter and tab key-events. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									1c854d580a
								
							
						
					
					
						commit
						8c89f6fe15
					
				
					 8 changed files with 185 additions and 56 deletions
				
			
		|  | @ -211,3 +211,11 @@ void TagWidget::fixPopupPosition(int delta) | |||
| 		m_completer->popup()->setGeometry(toGlobal.x(), toGlobal.y() + delta +10, toGlobal.width(), toGlobal.height()); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Since we capture enter / return / tab, we never send an editingFinished() signal.
 | ||||
| // Therefore, override the focusOutEvent()
 | ||||
| void TagWidget::focusOutEvent(QFocusEvent *ev) | ||||
| { | ||||
| 	GroupedLineEdit::focusOutEvent(ev); | ||||
| 	emit editingFinished(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue