Ignore:
Timestamp:
Jun 25, 2007, 5:30:10 PM (17 years ago)
Author:
garnier
Message:

r657@mac-90108: laurentgarnier | 2007-06-22 16:32:25 +0200
desormais la premiere fleche tapee dans la commandArea selectionne le dernier item

Location:
trunk/geant4/interfaces/basic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/interfaces/basic/include/G4UIQt.hh

    r527 r528  
    108108  G4bool GetHelpChoice(G4int&) ;// have to be implemeted because we heritate from G4VBasicShell
    109109  void ExitHelp();// have to be implemeted because we heritate from G4VBasicShell
    110   bool EventFilter(QObject*,QEvent*);
     110  bool eventFilter(QObject*,QEvent*);
    111111
    112112private:
  • trunk/geant4/interfaces/basic/src/G4UIQt.cc

    r527 r528  
    663663   @param event Kind of event
    664664*/
    665 bool G4UIQt::EventFilter(
     665bool G4UIQt::eventFilter( // Should stay with a minuscule eventFilter because of Qt
    666666 QObject *aObj
    667667,QEvent *aEvent
     
    684684          (e->key() == (Qt::Key_PageUp))) {
    685685        int selection = fCommandHistoryArea->currentRow();
    686         for (int a=0;a<fCommandHistoryArea->count();a++) {
    687          
    688         }
    689686        if (fCommandHistoryArea->count()) {
    690687          if (selection == -1) {
    691688            selection = fCommandHistoryArea->count()-1;
    692           }
    693           if (e->key() == (Qt::Key_Down)) {
    694             if (selection <(fCommandHistoryArea->count()-1))
    695               selection++;
    696           } else if (e->key() == (Qt::Key_PageDown)) {
    697             selection = fCommandHistoryArea->count()-1;
    698           } else if (e->key() == (Qt::Key_Up)) {
    699             if (selection >0)
    700               selection --;
    701           } else if (e->key() == (Qt::Key_PageUp)) {
    702             selection = 0;
     689          } else {
     690            if (e->key() == (Qt::Key_Down)) {
     691              if (selection <(fCommandHistoryArea->count()-1))
     692                selection++;
     693            } else if (e->key() == (Qt::Key_PageDown)) {
     694              selection = fCommandHistoryArea->count()-1;
     695            } else if (e->key() == (Qt::Key_Up)) {
     696              if (selection >0)
     697                selection --;
     698            } else if (e->key() == (Qt::Key_PageUp)) {
     699              selection = 0;
     700            }
    703701          }
    704702          fCommandHistoryArea->clearSelection();
Note: See TracChangeset for help on using the changeset viewer.