Index: /trunk/source/interfaces/basic/include/G4UIQt.hh
===================================================================
--- /trunk/source/interfaces/basic/include/G4UIQt.hh	(revision 1248)
+++ /trunk/source/interfaces/basic/include/G4UIQt.hh	(revision 1249)
@@ -154,4 +154,10 @@
   void CreateHistoryTBWidget();
   void OpenHelpTreeOnCommand(const QString &);
+  QString GetShortCommandPath(QString);
+#if QT_VERSION < 0x040000
+  QString GetLongCommandPath(QListViewItem*);
+#else
+  QString GetLongCommandPath(QTreeWidgetItem*);
+#endif
 
 private:
Index: /trunk/source/interfaces/basic/src/G4UIQt.cc
===================================================================
--- /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1248)
+++ /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1249)
@@ -1020,5 +1020,7 @@
   } else {
     // Memorise previous selection
-    defaultSelection = fHelpTreeWidget->currentItem()->text(0);
+    if (fHelpTreeWidget->currentItem() != NULL) {
+      defaultSelection = fHelpTreeWidget->currentItem()->text(0);
+    }
   }
   G4UImanager* UI = G4UImanager::GetUIpointer();
@@ -1043,8 +1045,8 @@
 #if QT_VERSION < 0x040000
     newItem = new QListViewItem(fHelpTreeWidget);
-    newItem->setText(0,QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace());
+    newItem->setText(0,GetShortCommandPath(QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace()));
 #else
     newItem = new QTreeWidgetItem(fHelpTreeWidget);
-    newItem->setText(0,QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).trimmed());
+    newItem->setText(0,GetShortCommandPath(QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).trimmed()));
 #endif
 
@@ -1099,9 +1101,9 @@
 #if QT_VERSION < 0x040000
       newItem = new QListViewItem(aParent);
-      newItem->setText(0,QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace());
+      newItem->setText(0,GetShortCommandPath(QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace()));
 
 #else
     newItem = new QTreeWidgetItem(aParent);
-    newItem->setText(0,QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).trimmed());
+    newItem->setText(0,GetShortCommandPath(QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).trimmed()));
 #endif
 
@@ -1118,10 +1120,10 @@
 #if QT_VERSION < 0x040000
     newItem = new QListViewItem(aParent);
-    newItem->setText(0,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).simplifyWhiteSpace());
+    newItem->setText(0,GetShortCommandPath(QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).simplifyWhiteSpace()));
     newItem->setOpen(false);
 
 #else
     newItem = new QTreeWidgetItem(aParent);
-    newItem->setText(0,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).trimmed());
+    newItem->setText(0,GetShortCommandPath(QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).trimmed()));
 #if QT_VERSION < 0x040202
    	fHelpTreeWidget->setItemExpanded(newItem,false); 
@@ -1511,4 +1513,5 @@
   QTreeWidgetItem* item =  NULL;
 #endif
+
   if (!fHelpTreeWidget)
     return ;
@@ -1532,13 +1535,6 @@
   G4UIcommandTree * treeTop = UI->GetTree();
 
-
-
-  std::string itemText;
-#if QT_VERSION < 0x040000
-  itemText = std::string(item->text(0).ascii());
-#else
-  itemText = std::string(item->text(0).toStdString());
-#endif
-
+  std::string itemText = GetLongCommandPath(item).toStdString();
+  
   G4UIcommand* command = treeTop->FindPath(itemText.c_str());
 
@@ -1603,5 +1599,5 @@
 
   fCommandArea->clear();
-  fCommandArea->setText(item->text(0));
+  fCommandArea->setText(GetLongCommandPath(item));
 }
 
@@ -1933,4 +1929,47 @@
 
   
+QString G4UIQt::GetShortCommandPath(
+QString commandPath
+)
+{
+  if (commandPath.indexOf("/") == 0) {
+    commandPath = commandPath.right(commandPath.size()-1);
+  }
+
+  commandPath = commandPath.right(commandPath.size()-commandPath.lastIndexOf("/",-2)-1);
+ 
+ if (commandPath.lastIndexOf("/") == (commandPath.size()-1)) {
+    commandPath = commandPath.left(commandPath.size()-1);
+  }
+
+ return commandPath;
+}
+
+
+QString G4UIQt::GetLongCommandPath(
+#if QT_VERSION < 0x040000
+ QListViewItem* item
+#else
+ QTreeWidgetItem* item
+#endif
+)
+{
+  if (item == NULL) return "";
+
+  // rebuild path:
+  QString itemText = "";
+  itemText = item->text(0);
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::HelpTreeClicCallback text:%s\n",item->text(0).toStdString().c_str());
+#endif
+  while (item->parent() != NULL) {
+    itemText = item->parent()->text(0)+"/"+itemText;
+    item = item->parent();
+  }
+  itemText = "/"+itemText;
+  
+  return itemText;
+}
 
 G4QTabWidget::G4QTabWidget(
