From: Karai C. <ck...@us...> - 2007-06-28 18:39:54
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1499/krusader_kde3/krusader/Panel Modified Files: krbriefview.cpp krdetailedview.cpp Log Message: FIXED: [ 1681270 ] right clicking pops context menu immediately Index: krbriefview.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/krbriefview.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** krbriefview.cpp 23 Jan 2007 10:38:27 -0000 1.21 --- krbriefview.cpp 28 Jun 2007 18:39:53 -0000 1.22 *************** *** 467,470 **** --- 467,497 ---- e->accept(); } + + if( !KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection() && KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0) + { + if( (e->state() & ControlButton) && !(e->state() & AltButton) ) + { + if( newCurrent ) + { + newCurrent->setSelected(!newCurrent->isSelected()); + newCurrent->repaint(); + selectionChanged = true; + callDefaultHandler = false; + e->accept(); + } + } + else if( !(e->state() & ControlButton) && !(e->state() & AltButton) ) + { + clearSelection(); + if( newCurrent ) + { + newCurrent->setSelected( true ); + newCurrent->repaint(); + } + selectionChanged = true; + callDefaultHandler = false; + e->accept(); + } + } } else Index: krdetailedview.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/krdetailedview.cpp,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** krdetailedview.cpp 27 Jun 2007 18:56:01 -0000 1.173 --- krdetailedview.cpp 28 Jun 2007 18:39:53 -0000 1.174 *************** *** 557,560 **** --- 557,587 ---- e->accept(); } + + if( !KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection() && KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0) + { + if( (e->state() & ControlButton) && !(e->state() & AltButton) ) + { + if( newCurrent ) + { + newCurrent->setSelected(!newCurrent->isSelected()); + newCurrent->repaint(); + selectionChanged = true; + callDefaultHandler = false; + e->accept(); + } + } + else if( !(e->state() & ControlButton) && !(e->state() & AltButton) ) + { + clearSelection(); + if( newCurrent ) + { + newCurrent->setSelected( true ); + newCurrent->repaint(); + } + selectionChanged = true; + callDefaultHandler = false; + e->accept(); + } + } } else |