mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 05:10:04 +00:00 
			
		
		
		
	Add timeline controls to hotkeys
This commit is contained in:
		
							parent
							
								
									1b8d35ba3e
								
							
						
					
					
						commit
						7564a2af18
					
				
					 4 changed files with 63 additions and 2 deletions
				
			
		|  | @ -32,6 +32,15 @@ static const std::unordered_map<types::Hotkey, QKeySequence> kDefaultHotkeys_ { | |||
|     QKeySequence {Qt::Key::Key_BracketLeft}}, | ||||
|    {types::Hotkey::ProductTiltIncrease, | ||||
|     QKeySequence {Qt::Key::Key_BracketRight}}, | ||||
|    {types::Hotkey::TimelineStepBegin, | ||||
|     QKeySequence {QKeyCombination {Qt::KeyboardModifier::ControlModifier, | ||||
|                                    Qt::Key::Key_Left}}}, | ||||
|    {types::Hotkey::TimelineStepBack, QKeySequence {Qt::Key::Key_Left}}, | ||||
|    {types::Hotkey::TimelinePlay, QKeySequence {Qt::Key::Key_Space}}, | ||||
|    {types::Hotkey::TimelineStepNext, QKeySequence {Qt::Key::Key_Right}}, | ||||
|    {types::Hotkey::TimelineStepEnd, | ||||
|     QKeySequence {QKeyCombination {Qt::KeyboardModifier::ControlModifier, | ||||
|                                    Qt::Key::Key_Right}}}, | ||||
|    {types::Hotkey::Unknown, QKeySequence {}}}; | ||||
| 
 | ||||
| static bool IsHotkeyValid(const std::string& value); | ||||
|  | @ -107,7 +116,7 @@ bool operator==(const HotkeySettings& lhs, const HotkeySettings& rhs) | |||
| 
 | ||||
| static bool IsHotkeyValid(const std::string& value) | ||||
| { | ||||
|    return QKeySequence {QString::fromStdString(value)} | ||||
|    return QKeySequence::fromString(QString::fromStdString(value)) | ||||
|              .toString() | ||||
|              .toStdString() == value; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat