mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	printing: detect a 'statistics' template when editing
Prefix the path for 'statistics' templates when detecting if a template is read-only. Import / Export for statistic templates is not supported. So the user has to manually copy and chown a '/statistics' templates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
		
							parent
							
								
									ba7f2a399b
								
							
						
					
					
						commit
						712697e0c2
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -124,7 +124,8 @@ void PrintOptions::on_printTemplate_currentIndexChanged(int index) | |||
| void PrintOptions::on_editButton_clicked() | ||||
| { | ||||
| 	QString templateName = getSelectedTemplate(); | ||||
| 	QFile f(getPrintingTemplatePathUser() + QDir::separator() + templateName); | ||||
| 	QString prefix = (printOptions->type == print_options::STATISTICS) ? "statistics/" : ""; | ||||
| 	QFile f(getPrintingTemplatePathUser() + QDir::separator() + prefix + templateName); | ||||
| 	if (!f.open(QFile::ReadWrite | QFile::Text)) { | ||||
| 		QMessageBox msgBox(this); | ||||
| 		msgBox.setWindowTitle(tr("Read-only template!")); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue