mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add flag to constructor of LineEditor
This commit is contained in:
parent
27c769f714
commit
6f845f0d42
@ -100,10 +100,7 @@ QWidget* PdmUiCheckBoxAndTextEditor::createEditorWidget( QWidget* parent )
|
||||
{
|
||||
auto* containerWidget = new QWidget( parent );
|
||||
|
||||
auto lineEditWidget = new PdmUiLineEdit( containerWidget );
|
||||
lineEditWidget->setAvoidSendingEnterEventToParentWidget( true );
|
||||
|
||||
m_lineEdit = lineEditWidget;
|
||||
m_lineEdit = new PdmUiLineEdit( containerWidget, true );
|
||||
connect( m_lineEdit, SIGNAL( editingFinished() ), this, SLOT( slotSetValueToField() ) );
|
||||
|
||||
m_checkBox = new QCheckBox( "", containerWidget );
|
||||
|
@ -88,7 +88,7 @@ void PdmUiLineEditor::updateLineEditFromReadOnlyState( QLineEdit* lineEdit, bool
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QWidget* PdmUiLineEditor::createEditorWidget( QWidget* parent )
|
||||
{
|
||||
m_lineEdit = new PdmUiLineEdit( parent );
|
||||
m_lineEdit = new PdmUiLineEdit( parent, false );
|
||||
|
||||
connect( m_lineEdit, SIGNAL( editingFinished() ), this, SLOT( slotEditingFinished() ) );
|
||||
|
||||
@ -394,9 +394,9 @@ bool PdmUiLineEditor::isMultipleFieldsWithSameKeywordSelected( PdmFieldHandle* e
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
PdmUiLineEdit::PdmUiLineEdit( QWidget* parent )
|
||||
PdmUiLineEdit::PdmUiLineEdit( QWidget* parent, bool avoidSendingEnterEvent )
|
||||
: QLineEdit( parent )
|
||||
, m_avoidSendingEnterEvent( false )
|
||||
, m_avoidSendingEnterEvent( avoidSendingEnterEvent )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ class PdmUiLineEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiLineEdit( QWidget* parent );
|
||||
PdmUiLineEdit( QWidget* parent, bool avoidSendingEnterEvent );
|
||||
void setAvoidSendingEnterEventToParentWidget( bool avoidSendingEnter );
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user