Don't release focus from color popup text fields on key down

This bug was introduced in 43a225afe0217c698896a92e20f1cb627e718bcf
This commit is contained in:
David Capello 2016-12-05 12:34:01 -03:00
parent 4ff2286651
commit 52030e83f3

View File

@ -270,8 +270,13 @@ void ColorPopup::selectColorType(app::Color::Type type)
case app::Color::MaskType: m_colorType.setSelectedItem(MASK_MODE); break;
}
// Remove focus from some RGB/HSB text entry
manager()->freeFocus();
// Remove focus from hidden RGB/HSB text entries
auto widget = manager()->getFocus();
if (widget && !widget->isVisible()) {
auto window = widget->window();
if (window && window == this)
widget->releaseFocus();
}
m_vbox.layout();
m_vbox.invalidate();