Changeset 522


Ignore:
Timestamp:
Jun 21, 2007, 5:42:49 PM (17 years ago)
Author:
garnier
Message:

r648@mac-90108: laurentgarnier | 2007-06-21 14:53:57 +0200
desormais l envoie d une commande vide ne s ajoute pas a la liste

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/interfaces/basic/src/G4UIQt.cc

    r521 r522  
    118118  fCommandArea->activateWindow();
    119119  connect(fCommandArea, SIGNAL(returnPressed()), SLOT(commandEnteredCallback()));
    120   fCommandArea->setFocusPolicy ( Qt::StrongFocus );
    121   fCommandArea->setFocus(Qt::TabFocusReason);
     120  //  fCommandArea->setFocusPolicy ( Qt::StrongFocus );
     121  //  fCommandArea->setFocus(Qt::TabFocusReason);
    122122  fTextArea->setReadOnly(true);
    123123
    124124
    125125  // Set layouts
    126   QVBoxLayout *layoutSplitter = new QVBoxLayout;
    127126
    128127  QWidget* topWidget = new QWidget();
     
    143142
    144143
    145   layoutSplitter->addWidget(topWidget);
    146   layoutSplitter->addWidget(bottomWidget);
    147   splitter->setLayout(layoutSplitter);
    148 
     144  splitter->addWidget(topWidget);
     145  splitter->addWidget(bottomWidget);
    149146  fMainWindow->setCentralWidget(splitter);
    150147
     
    402399
    403400    // Set layouts
    404     QHBoxLayout *splitterLayout = new QHBoxLayout;
    405401
    406402    QVBoxLayout *vLayout = new QVBoxLayout;
    407403
    408     splitterLayout->addWidget(fHelpTreeWidget);
    409     splitterLayout->addWidget(fHelpArea);
    410     splitter->setLayout(splitterLayout);
     404    splitter->addWidget(fHelpTreeWidget);
     405    splitter->addWidget(fHelpArea);
    411406
    412407    vLayout->addWidget(splitter);
     
    635630    }
    636631  }
    637  
    638632  // pass the event on to the parent class
    639633  return QObject::eventFilter(obj, event);
     
    678672{
    679673  G4String command (fCommandArea->text().toStdString().c_str());
    680   if (fCommandArea->text().toStdString().c_str() != "") {
     674  if (fCommandArea->text().trimmed() != "") {
    681675    fCommandHistoryArea->addItem(fCommandArea->text());
    682676    fCommandHistoryArea->clearSelection();
     
    685679
    686680    if (command(0,4) != "help") {
    687       ApplyShellCommand (command,exitSession,exitPause);
     681        ApplyShellCommand (command,exitSession,exitPause);
    688682    } else {
    689683      TerminalHelp(command);
Note: See TracChangeset for help on using the changeset viewer.