mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Planner: states Add and Plan have a similar behavior
So, the code is equal. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									feff22c222
								
							
						
					
					
						commit
						c4d022356e
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -770,9 +770,17 @@ void ProfileWidget2::setPlanState()
 | 
			
		|||
{
 | 
			
		||||
	if (currentState == PLAN)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	setProfileState();
 | 
			
		||||
	disconnectTemporaryConnections();
 | 
			
		||||
	/* show the same stuff that the profile shows. */
 | 
			
		||||
	//TODO: Move this method to another place, shouldn't be on mainwindow.
 | 
			
		||||
	MainWindow::instance()->disableDcShortcuts();
 | 
			
		||||
	actionsForKeys[Qt::Key_Left]->setShortcut(Qt::Key_Left);
 | 
			
		||||
	actionsForKeys[Qt::Key_Right]->setShortcut(Qt::Key_Right);
 | 
			
		||||
	actionsForKeys[Qt::Key_Up]->setShortcut(Qt::Key_Up);
 | 
			
		||||
	actionsForKeys[Qt::Key_Down]->setShortcut(Qt::Key_Down);
 | 
			
		||||
	actionsForKeys[Qt::Key_Escape]->setShortcut(Qt::Key_Escape);
 | 
			
		||||
	actionsForKeys[Qt::Key_Delete]->setShortcut(Qt::Key_Delete);
 | 
			
		||||
 | 
			
		||||
	DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
 | 
			
		||||
	connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot()));
 | 
			
		||||
| 
						 | 
				
			
			@ -781,7 +789,7 @@ void ProfileWidget2::setPlanState()
 | 
			
		|||
		this, SLOT(pointInserted(const QModelIndex &, int, int)));
 | 
			
		||||
	connect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
 | 
			
		||||
		this, SLOT(pointsRemoved(const QModelIndex &, int, int)));
 | 
			
		||||
 | 
			
		||||
	/* show the same stuff that the profile shows. */
 | 
			
		||||
	currentState = PLAN; /* enable the add state. */
 | 
			
		||||
	setBackgroundBrush(QColor(Qt::green).light());
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue