mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 00:26:39 +00:00 
			
		
		
		
	improved adjuster widget problem reporting
(cherry picked from commit 4fd3097c1c)
			
			
This commit is contained in:
		
							parent
							
								
									ef1e01639e
								
							
						
					
					
						commit
						a5a0990d3c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -63,6 +63,7 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
 | 
			
		|||
    QString message;
 | 
			
		||||
 | 
			
		||||
    mValid = (!name.isEmpty());
 | 
			
		||||
    bool warning = false;
 | 
			
		||||
 | 
			
		||||
    if (!mValid)
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			@ -105,13 +106,14 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
 | 
			
		|||
            {
 | 
			
		||||
                /// \todo add an user setting to make this an error.
 | 
			
		||||
                message += "<p>A file with the same name already exists. If you continue, it will be overwritten.";
 | 
			
		||||
                warning = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    mMessage->setText (message);
 | 
			
		||||
    mIcon->setPixmap (style()->standardIcon (
 | 
			
		||||
        mValid ? QStyle::SP_MessageBoxInformation : QStyle::SP_MessageBoxWarning).
 | 
			
		||||
        mValid ? (warning ? QStyle::SP_MessageBoxWarning : QStyle::SP_MessageBoxInformation) : QStyle::SP_MessageBoxCritical).
 | 
			
		||||
        pixmap (QSize (16, 16)));
 | 
			
		||||
 | 
			
		||||
    emit stateChanged (mValid);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue