TGFileDialog check if cancel pressed

Dear ROOTers
is is possible to get the type button pressed in TGFileDialog, I’m using code like this

        TGFileInfo fi;
        fi.fFileTypes = filetypes;
        fi.fIniDir    = StrDup(".");
        new TGFileDialog(gClient->GetRoot(), gEve->GetMainWindow(), kFDSave, &fi);
        filename  = fi.fFilename;

The problem is that I cannot distinguish betwee user that clicked Save or Cancel

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

fi.fFilename will be nullptr is the dialog was cancelled.
Cheers, Axel.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.