VirtualBox

Ignore:
Timestamp:
Jun 21, 2017 2:25:46 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
116286
Message:

FE/Qt: bugref:8901: Selector UI: Tools pane: Snapshot pane: A bit of automation for Delete snapshot action.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp

    r67540 r67543  
    10901090                restoreSnapshot(true /* suppress non-critical warnings */);
    10911091        }
     1092        /* Handle Ctrl+Shift+DoubleClick: */
     1093        else if (QApplication::keyboardModifiers() == (Qt::KeyboardModifiers)(Qt::ControlModifier | Qt::ShiftModifier))
     1094        {
     1095            /* As snapshot-delete procedure: */
     1096            if (!pSnapshotItem->isCurrentStateItem())
     1097                deleteSnapshot(true /* automatically */);
     1098        }
    10921099        /* Handle other kinds of DoubleClick: */
    10931100        else
     
    15641571}
    15651572
    1566 bool UISnapshotPane::deleteSnapshot()
     1573bool UISnapshotPane::deleteSnapshot(bool fAutomatically /* = false */)
    15671574{
    15681575    /* Simulate try-catch block: */
     
    15831590
    15841591        /* Ask if user really wants to remove the selected snapshot: */
    1585         if (!msgCenter().confirmSnapshotRemoval(comSnapshot.GetName()))
     1592        if (!fAutomatically && !msgCenter().confirmSnapshotRemoval(comSnapshot.GetName()))
    15861593            break;
    15871594
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h

    r67540 r67543  
    169169        bool takeSnapshot(bool fAutomatically = false);
    170170        /** Proposes to delete the snapshot. */
    171         bool deleteSnapshot();
     171        bool deleteSnapshot(bool fAutomatically = false);
    172172        /** Proposes to restore the snapshot. */
    173173        bool restoreSnapshot(bool fSuppressNonCriticalWarnings = false);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette