diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-06-14 08:10:03 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-06-14 08:10:03 +0000 |
commit | f72c6839798bb350e8fa4abd7f8cb99383ebb920 (patch) | |
tree | f58ca6b2b83c7037a9fc4d1b9321cf6c01d68679 /dtrans | |
parent | 4dafb4941f4e800d074b7dc0bb5b03e0d367a840 (diff) |
#86206# define a default user action
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/X11/X11_selection.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index f45917404273..9cdcda871a87 100644 --- a/dtrans/source/X11/X11_selection.cxx +++ b/dtrans/source/X11/X11_selection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: X11_selection.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: pl $ $Date: 2001-06-13 16:29:12 $ + * last change: $Author: pl $ $Date: 2001-06-14 09:10:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1519,6 +1519,18 @@ bool SelectionManager::updateDragAction( int modifierState ) nNewDropAction = DNDConstants::ACTION_COPY; nNewDropAction &= m_nSourceActions; + if( ! nNewDropAction && ! ( modifierState & ( ControlMask | ShiftMask ) ) ) + { + // default to a default action so the user does not have to press + // keys explicitly + if( m_nSourceActions & DNDConstants::ACTION_MOVE ) + nNewDropAction = DNDConstants::ACTION_MOVE; + else if( m_nSourceActions & DNDConstants::ACTION_COPY ) + nNewDropAction = DNDConstants::ACTION_COPY; + else if( m_nSourceActions & DNDConstants::ACTION_LINK ) + nNewDropAction = DNDConstants::ACTION_LINK; + } + if( nNewDropAction != m_nUserDragAction ) { #ifdef DEBUG |