mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix the ZLevel value of some items.
Almost all of the items on the new profile were being painted on the same ZLevel, so the level of awesomeness was a bit random. This puts things on the correct spots, events on top of everything, profile at the bottom, things in the middle. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									2e2a87e619
								
							
						
					
					
						commit
						4005ee2ae8
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -90,6 +90,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
 | 
				
			||||||
	meanDepth->setLine(0,0,96,0);
 | 
						meanDepth->setLine(0,0,96,0);
 | 
				
			||||||
	meanDepth->setX(3);
 | 
						meanDepth->setX(3);
 | 
				
			||||||
	meanDepth->setPen(QPen(QBrush(Qt::red), 0, Qt::SolidLine));
 | 
						meanDepth->setPen(QPen(QBrush(Qt::red), 0, Qt::SolidLine));
 | 
				
			||||||
 | 
						meanDepth->setZValue(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cartesianPlane->setBottomAxis(timeAxis);
 | 
						cartesianPlane->setBottomAxis(timeAxis);
 | 
				
			||||||
	cartesianPlane->setLeftAxis(profileYAxis);
 | 
						cartesianPlane->setLeftAxis(profileYAxis);
 | 
				
			||||||
| 
						 | 
					@ -319,6 +320,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
	diveProfileItem->setModel(dataModel);
 | 
						diveProfileItem->setModel(dataModel);
 | 
				
			||||||
	diveProfileItem->setVerticalDataColumn(DivePlotDataModel::DEPTH);
 | 
						diveProfileItem->setVerticalDataColumn(DivePlotDataModel::DEPTH);
 | 
				
			||||||
	diveProfileItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
						diveProfileItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
						diveProfileItem->setZValue(0);
 | 
				
			||||||
	scene()->addItem(diveProfileItem);
 | 
						scene()->addItem(diveProfileItem);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	qDeleteAll(eventItems);
 | 
						qDeleteAll(eventItems);
 | 
				
			||||||
| 
						 | 
					@ -347,6 +349,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
	temperatureItem->setModel(dataModel);
 | 
						temperatureItem->setModel(dataModel);
 | 
				
			||||||
	temperatureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE);
 | 
						temperatureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE);
 | 
				
			||||||
	temperatureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
						temperatureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
						temperatureItem->setZValue(1);
 | 
				
			||||||
	scene()->addItem(temperatureItem);
 | 
						scene()->addItem(temperatureItem);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(gasPressureItem){
 | 
						if(gasPressureItem){
 | 
				
			||||||
| 
						 | 
					@ -359,6 +362,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
	gasPressureItem->setModel(dataModel);
 | 
						gasPressureItem->setModel(dataModel);
 | 
				
			||||||
	gasPressureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE);
 | 
						gasPressureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE);
 | 
				
			||||||
	gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
						gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
						gasPressureItem->setZValue(1);
 | 
				
			||||||
	scene()->addItem(gasPressureItem);
 | 
						scene()->addItem(gasPressureItem);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(diveCeiling){
 | 
						if(diveCeiling){
 | 
				
			||||||
| 
						 | 
					@ -371,6 +375,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
	diveCeiling->setModel(dataModel);
 | 
						diveCeiling->setModel(dataModel);
 | 
				
			||||||
	diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING);
 | 
						diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING);
 | 
				
			||||||
	diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
						diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
						diveCeiling->setZValue(1);
 | 
				
			||||||
	scene()->addItem(diveCeiling);
 | 
						scene()->addItem(diveCeiling);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	diveComputerText->setText(currentdc->model);
 | 
						diveComputerText->setText(currentdc->model);
 | 
				
			||||||
| 
						 | 
					@ -385,6 +390,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
		tissueItem->setModel(dataModel);
 | 
							tissueItem->setModel(dataModel);
 | 
				
			||||||
		tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i);
 | 
							tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i);
 | 
				
			||||||
		tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
							tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
							tissueItem->setZValue(1);
 | 
				
			||||||
		allTissues.append(tissueItem);
 | 
							allTissues.append(tissueItem);
 | 
				
			||||||
		scene()->addItem(tissueItem);
 | 
							scene()->addItem(tissueItem);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -399,6 +405,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
				
			||||||
	reportedCeiling->setModel(dataModel);
 | 
						reportedCeiling->setModel(dataModel);
 | 
				
			||||||
	reportedCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING);
 | 
						reportedCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING);
 | 
				
			||||||
	reportedCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
						reportedCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME);
 | 
				
			||||||
 | 
						reportedCeiling->setZValue(1);
 | 
				
			||||||
	scene()->addItem(reportedCeiling);
 | 
						scene()->addItem(reportedCeiling);
 | 
				
			||||||
	emit startProfileState();
 | 
						emit startProfileState();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue