Changeset 82430 in vbox for trunk/src/VBox
- Timestamp:
- Dec 5, 2019 4:49:10 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGraphicsControllerEditor.cpp
r80072 r82430 30 30 : QIWithRetranslateUI<QWidget>(pParent) 31 31 , m_fWithLabel(fWithLabel) 32 , m_enmValue(KGraphicsControllerType_Max) 32 33 , m_pLabel(0) 33 34 , m_pCombo(0) … … 40 41 if (m_pCombo) 41 42 { 42 int iIndex = m_pCombo->findData(QVariant::fromValue(enmValue)); 43 /* Update cached value: */ 44 m_enmValue = enmValue; 45 46 /* Look for proper index to choose: */ 47 int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue)); 43 48 if (iIndex != -1) 44 49 m_pCombo->setCurrentIndex(iIndex); … … 48 53 KGraphicsControllerType UIGraphicsControllerEditor::value() const 49 54 { 50 return m_pCombo ? m_pCombo-> itemData(m_pCombo->currentIndex()).value<KGraphicsControllerType>() : KGraphicsControllerType_Null;55 return m_pCombo ? m_pCombo->currentData().value<KGraphicsControllerType>() : m_enmValue; 51 56 } 52 57 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGraphicsControllerEditor.h
r80068 r82430 77 77 bool m_fWithLabel; 78 78 79 /** Holds the value to be selected. */ 80 KGraphicsControllerType m_enmValue; 81 79 82 /** Holds the label instance. */ 80 83 QLabel *m_pLabel;
Note:
See TracChangeset
for help on using the changeset viewer.