Changeset 17766 in vbox
- Timestamp:
- Mar 12, 2009 5:07:21 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h
r13580 r17766 379 379 QUuid getWithNewHDWizard(); 380 380 int maxNameLength() const; 381 void removeFocus(); 381 382 382 383 /* variables */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp
r17669 r17766 942 942 void VBoxVMSettingsHD::onSATACheckToggled (int aState) 943 943 { 944 removeFocus(); 944 945 if (aState == Qt::Unchecked) 945 946 { … … 964 965 else 965 966 { 967 removeFocus(); 966 968 /* Delete SATA items */ 967 969 mModel->removeSata(); … … 983 985 void VBoxVMSettingsHD::onShowDiffsCheckToggled (int aState) 984 986 { 987 removeFocus(); 985 988 HDSettings::instance()->setShowDiffs (aState == Qt::Checked); 986 989 } … … 1133 1136 } 1134 1137 1138 void VBoxVMSettingsHD::removeFocus() 1139 { 1140 #ifdef Q_WS_MAC 1141 /* On the Mac checkboxes aren't focus aware. Therewith a editor widget get 1142 * not closed by clicking on the checkbox. As a result the content of the 1143 * currently used editor (QComboBox) isn't updated. So manually remove the 1144 * focus to force the closing of any open editor widget. */ 1145 QWidget *focusWidget = qApp->focusWidget(); 1146 if (focusWidget) 1147 focusWidget->clearFocus(); 1148 #endif /* Q_WS_MAC */ 1149 }
Note:
See TracChangeset
for help on using the changeset viewer.