Skip to content
Snippets Groups Projects
Commit e390d89f authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

Change the file name only if the selected entry is not a directory (as...

Change the file name only if the selected entry is not a directory (as reported on the forum http://root.cern.ch/phpBB3//viewtopic.php?f=3&t=14370)


git-svn-id: http://root.cern.ch/svn/root/trunk@43377 27541ba8-7e3a-0410-8455-c3a389f83636
parent e5f2830d
No related branches found
No related tags found
No related merge requests found
......@@ -535,10 +535,12 @@ Bool_t TGFileDialog::ProcessMessage(Long_t msg, Long_t parm1, Long_t)
if (fFc->NumSelected() > 0) {
if ( fFileInfo->fMultipleSelection == kFALSE ) {
TGLVEntry *e2 = (TGLVEntry *) fFc->GetNextSelected(&p);
fTbfname->Clear();
if ((e2) && (e2->GetItemName()))
fTbfname->AddText(0, e2->GetItemName()->GetString());
fClient->NeedRedraw(fName);
if ((e2) && !R_ISDIR(((TGFileItem *)e2)->GetType())) {
fTbfname->Clear();
if (e2->GetItemName())
fTbfname->AddText(0, e2->GetItemName()->GetString());
fClient->NeedRedraw(fName);
}
}
else {
TString tmpString;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment