Changeset 8609 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 5, 2008 5:11:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaComboBox.cpp
r8418 r8609 261 261 QPixmap *aPixmap) 262 262 { 263 aPixmap ? insertItem (*aPixmap, aName) : insertItem (aName); 264 mUuidList << aId; 265 mTipList << aTip; 263 int currentIndex = currentItem(); 264 265 int insertPosition = -1; 266 for (int i = 0; i < count(); ++ i) 267 if (text (i) > aName) 268 { 269 insertPosition = i; 270 break; 271 } 272 273 insertPosition == -1 ? mUuidList.append (aId) : 274 mUuidList.insert (mUuidList.at (insertPosition), aId); 275 276 insertPosition == -1 ? mTipList.append (aId) : 277 mTipList.insert (mTipList.at (insertPosition), aTip); 278 279 aPixmap ? insertItem (*aPixmap, aName, insertPosition) : 280 insertItem (aName, insertPosition); 281 282 if (insertPosition != -1 && currentIndex >= insertPosition) 283 QComboBox::setCurrentItem (currentIndex + 1); 266 284 } 267 285
Note:
See TracChangeset
for help on using the changeset viewer.