mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Do nothing if color dialog is closed using Escape button
This commit is contained in:
parent
719feac15e
commit
f981cf2ce0
@ -121,11 +121,14 @@ void RicThemeColorEditorFeature::onActionTriggered( bool isChecked )
|
||||
&QPushButton::clicked,
|
||||
[this, variableValueMap, variableName, theme, editor, widget, colorBox]() -> void {
|
||||
QColor color = QColorDialog::getColor( colorBox->palette().color( QPalette::Button ), widget );
|
||||
if ( color.isValid() )
|
||||
{
|
||||
colorBox->setStyleSheet( QString( "background-color: %0;" ).arg( color.name() ) );
|
||||
colorBox->style()->unpolish( colorBox );
|
||||
colorBox->style()->polish( colorBox );
|
||||
RiuGuiTheme::changeVariableValue( theme, variableName, color.name() );
|
||||
editor->setPlainText( RiuGuiTheme::applyVariableValueMapToStyleSheet( theme ) );
|
||||
}
|
||||
} );
|
||||
innerLayout->addWidget( colorBox, row++, column + 1 );
|
||||
if ( row == 10 )
|
||||
|
Loading…
Reference in New Issue
Block a user