diff --git a/gb.qt4/src/CTextBox.cpp b/gb.qt4/src/CTextBox.cpp index 3376c389d..48e2f21aa 100644 --- a/gb.qt4/src/CTextBox.cpp +++ b/gb.qt4/src/CTextBox.cpp @@ -387,6 +387,7 @@ static void combo_set_editable(void *_object, bool ed) { QLineEdit *textbox; QString text; + bool hasFocus = COMBOBOX->hasFocus(); COMBOBOX->blockSignals(true); text = COMBOBOX->currentText(); @@ -411,11 +412,17 @@ static void combo_set_editable(void *_object, bool ed) } else { + get(THIS, &textbox); + textbox->setFocusProxy(0); COMBOBOX->setEditable(false); + COMBOBOX->update(); } combo_set_text(THIS, text); + if (hasFocus) + COMBOBOX->setFocus(); + if (CWIDGET_test_flag(THIS, WF_DESIGN)) COMBOBOX->setFocusPolicy(Qt::NoFocus); diff --git a/gb.qt4/src/CWidget.cpp b/gb.qt4/src/CWidget.cpp index daa088387..f88e3ed80 100644 --- a/gb.qt4/src/CWidget.cpp +++ b/gb.qt4/src/CWidget.cpp @@ -1894,11 +1894,11 @@ void CWidget::destroy() GB.Unref(POINTER(&ob)); } -static void post_dblclick_event(void *control) +/*static void post_dblclick_event(void *control) { GB.Raise(control, EVENT_DblClick, 0); GB.Unref(&control); -} +}*/ static void post_focus_change(void *) { @@ -2042,7 +2042,7 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) __FOCUS_IN: { - //qDebug("FocusIn: %p %s (%p)", control, control->name, CWIDGET_active_control); + //qDebug("FocusIn: %p %s (%p %s)", control, control->name, CWIDGET_active_control, CWIDGET_active_control ? CWIDGET_active_control->name : ""); CWIDGET_active_control = control; handle_focus_change(); CWINDOW_activate(control); @@ -2051,7 +2051,7 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) __FOCUS_OUT: { - //qDebug("FocusOut: %p %s (%p)", control, control->name, CWIDGET_active_control); + //qDebug("FocusOut: %p %s (%p %s)", control, control->name, CWIDGET_active_control, CWIDGET_active_control ? CWIDGET_active_control->name : ""); CWIDGET_active_control = NULL; handle_focus_change(); goto __NEXT; @@ -2200,6 +2200,7 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) goto __NEXT; } + /* __DBL_CLICK: { if (!original) @@ -2213,6 +2214,7 @@ bool CWidget::eventFilter(QObject *widget, QEvent *event) } goto __NEXT; } + */ __KEY: {