Changeset 43154 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 3, 2012 5:49:53 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp
r43012 r43154 174 174 int iGroupItemWidth = pGroupItem->geometry().toRect().width(); 175 175 int iMouseDoubleClickX = pEvent->scenePos().toPoint().x(); 176 /* If click was at left part: */177 if ( iMouseDoubleClickX < iGroupItemWidth / 2)178 { 179 /* If it was aroot: */180 if ( pGroupItem->isRoot())181 {182 /* Do not allow for unhovered root: */183 if (!pGroupItem->isHovered())184 return false;185 /* Unindent root if possible: */186 if (model()->root() != model()->mainRoot())187 {188 pGroupItem->setHovered(false);189 model()->unindentRoot();190 }191 }192 /* For simple group item: */193 else176 /* If it was a root: */ 177 if (pGroupItem->isRoot()) 178 { 179 /* Do not allow for unhovered root: */ 180 if (!pGroupItem->isHovered()) 181 return false; 182 /* Unindent root if possible: */ 183 if (model()->root() != model()->mainRoot()) 184 { 185 pGroupItem->setHovered(false); 186 model()->unindentRoot(); 187 } 188 } 189 /* If it was a simple group item: */ 190 else 191 { 192 /* If click was at left part: */ 193 if (iMouseDoubleClickX < iGroupItemWidth / 2) 194 194 { 195 195 /* Toggle it: */ … … 199 199 pGroupItem->open(); 200 200 } 201 } 202 else 203 { 204 /* Do not allow for root: */ 205 if (pGroupItem->isRoot()) 206 return false; 207 /* Indent root with group item: */ 208 pGroupItem->setHovered(false); 209 model()->indentRoot(pGroupItem); 201 /* If click was at right part: */ 202 else 203 { 204 /* Indent root with group item: */ 205 pGroupItem->setHovered(false); 206 model()->indentRoot(pGroupItem); 207 } 210 208 } 211 209 /* Filter that event out: */
Note:
See TracChangeset
for help on using the changeset viewer.