mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 02:56:44 +00:00 
			
		
		
		
	Merge remote-tracking branch 'rcutmore/fix-editor-tab-order'
This commit is contained in:
		
						commit
						3e0347a9ed
					
				
					 2 changed files with 11 additions and 3 deletions
				
			
		|  | @ -40,6 +40,10 @@ void CSVWorld::GenericCreator::insertAtBeginning (QWidget *widget, bool stretche | ||||||
| void CSVWorld::GenericCreator::insertBeforeButtons (QWidget *widget, bool stretched) | void CSVWorld::GenericCreator::insertBeforeButtons (QWidget *widget, bool stretched) | ||||||
| { | { | ||||||
|     mLayout->insertWidget (mLayout->count()-2, widget, stretched ? 1 : 0); |     mLayout->insertWidget (mLayout->count()-2, widget, stretched ? 1 : 0); | ||||||
|  | 
 | ||||||
|  |     // Reset tab order relative to buttons.
 | ||||||
|  |     setTabOrder(widget, mCreate); | ||||||
|  |     setTabOrder(mCreate, mCancel); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::string CSVWorld::GenericCreator::getId() const | std::string CSVWorld::GenericCreator::getId() const | ||||||
|  | @ -161,12 +165,12 @@ CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undo | ||||||
|     mCreate = new QPushButton ("Create"); |     mCreate = new QPushButton ("Create"); | ||||||
|     mLayout->addWidget (mCreate); |     mLayout->addWidget (mCreate); | ||||||
| 
 | 
 | ||||||
|     QPushButton *cancelButton = new QPushButton ("Cancel"); |     mCancel = new QPushButton("Cancel"); | ||||||
|     mLayout->addWidget (cancelButton); |     mLayout->addWidget(mCancel); | ||||||
| 
 | 
 | ||||||
|     setLayout (mLayout); |     setLayout (mLayout); | ||||||
| 
 | 
 | ||||||
|     connect (cancelButton, SIGNAL (clicked (bool)), this, SIGNAL (done())); |     connect (mCancel, SIGNAL (clicked (bool)), this, SIGNAL (done())); | ||||||
|     connect (mCreate, SIGNAL (clicked (bool)), this, SLOT (create())); |     connect (mCreate, SIGNAL (clicked (bool)), this, SLOT (create())); | ||||||
| 
 | 
 | ||||||
|     connect (mId, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&))); |     connect (mId, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&))); | ||||||
|  |  | ||||||
|  | @ -33,6 +33,7 @@ namespace CSVWorld | ||||||
|             QUndoStack& mUndoStack; |             QUndoStack& mUndoStack; | ||||||
|             CSMWorld::UniversalId mListId; |             CSMWorld::UniversalId mListId; | ||||||
|             QPushButton *mCreate; |             QPushButton *mCreate; | ||||||
|  |             QPushButton *mCancel; | ||||||
|             QLineEdit *mId; |             QLineEdit *mId; | ||||||
|             std::string mErrors; |             std::string mErrors; | ||||||
|             QHBoxLayout *mLayout; |             QHBoxLayout *mLayout; | ||||||
|  | @ -56,6 +57,9 @@ namespace CSVWorld | ||||||
| 
 | 
 | ||||||
|             void insertAtBeginning (QWidget *widget, bool stretched); |             void insertAtBeginning (QWidget *widget, bool stretched); | ||||||
| 
 | 
 | ||||||
|  |             /// \brief Insert given widget before Create and Cancel buttons.
 | ||||||
|  |             /// \param widget Widget to add to layout.
 | ||||||
|  |             /// \param stretched Whether widget should be streched or not.
 | ||||||
|             void insertBeforeButtons (QWidget *widget, bool stretched); |             void insertBeforeButtons (QWidget *widget, bool stretched); | ||||||
| 
 | 
 | ||||||
|             virtual std::string getId() const; |             virtual std::string getId() const; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue