mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Clear after accepting / rejecting the LocationEdit
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									986b6c509a
								
							
						
					
					
						commit
						500c4c2772
					
				
					 2 changed files with 14 additions and 0 deletions
				
			
		|  | @ -740,6 +740,8 @@ void LocationInformationWidget::acceptChanges() | ||||||
| 		setLocationId(currentDs->uuid); | 		setLocationId(currentDs->uuid); | ||||||
| 	} | 	} | ||||||
| 	mark_divelist_changed(true); | 	mark_divelist_changed(true); | ||||||
|  | 	resetPallete(); | ||||||
|  | 	ui.diveSiteNotes->hide(); | ||||||
| 	emit informationManagementEnded(); | 	emit informationManagementEnded(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -753,6 +755,8 @@ void LocationInformationWidget::rejectChanges() | ||||||
| 	} else { | 	} else { | ||||||
| 		setLocationId(currentDs->uuid); | 		setLocationId(currentDs->uuid); | ||||||
| 	} | 	} | ||||||
|  | 	resetPallete(); | ||||||
|  | 	ui.diveSiteNotes->hide(); | ||||||
| 	emit informationManagementEnded(); | 	emit informationManagementEnded(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -800,3 +804,12 @@ void LocationInformationWidget::on_diveSiteNotes_textChanged() | ||||||
| 	if (!same_string(qPrintable(ui.diveSiteNotes->toPlainText()),  currentDs->notes)) | 	if (!same_string(qPrintable(ui.diveSiteNotes->toPlainText()),  currentDs->notes)) | ||||||
| 		markChangedWidget(ui.diveSiteNotes); | 		markChangedWidget(ui.diveSiteNotes); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | void LocationInformationWidget::resetPallete() | ||||||
|  | { | ||||||
|  | 	QPalette p; | ||||||
|  | 	ui.diveSiteCoordinates->setPalette(p); | ||||||
|  | 	ui.diveSiteDescription->setPalette(p); | ||||||
|  | 	ui.diveSiteName->setPalette(p); | ||||||
|  | 	ui.diveSiteNotes->setPalette(p); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -232,6 +232,7 @@ public slots: | ||||||
| 	void updateGpsCoordinates(void); | 	void updateGpsCoordinates(void); | ||||||
| 	void markChangedWidget(QWidget *w); | 	void markChangedWidget(QWidget *w); | ||||||
| 	void enableEdition(); | 	void enableEdition(); | ||||||
|  | 	void resetPallete(); | ||||||
| 
 | 
 | ||||||
| 	void on_diveSiteCoordinates_textChanged(const QString& text); | 	void on_diveSiteCoordinates_textChanged(const QString& text); | ||||||
| 	void on_diveSiteDescription_textChanged(const QString& text); | 	void on_diveSiteDescription_textChanged(const QString& text); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue