diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx index 27f24e5b65..c4638e2427 100644 --- a/src/XSDRAW/XSDRAW.cxx +++ b/src/XSDRAW/XSDRAW.cxx @@ -40,7 +40,8 @@ #include #include -#include +#include +#include //#include static int deja = 0, dejald = 0; //unused variable @@ -256,16 +257,23 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) Handle(TColStd_HSequenceOfTransient) XSDRAW::GetList (const Standard_CString first, const Standard_CString second) { - Handle(TColStd_HSequenceOfTransient) list; - if (!first || first[0] == '\0') { - char ligne[80]; ligne[0] = '\0'; char truc; -// std::cin.clear(); std::cin.get (ligne,79,'\n'); - std::cin >> ligne; Standard_Size ln = strlen(ligne); - char *ff = &ligne[0], *ss = NULL; - std::cin.get(truc); if (truc != '\n') { std::cin>>&ligne[ln+1]; ss = &ligne[ln+1]; } - return XSDRAW::GetList (ff,ss); + if ( !first || first[0] == '\0' ) + { + std::string aLineFirst; + std::cin >> aLineFirst; + + char terminateSymbol = '\0'; + std::cin.get(terminateSymbol); + + if ( terminateSymbol == '\n' ) + return XSDRAW::GetList (aLineFirst.c_str(), nullptr); + else + { + std::string aLineSecond; + std::cin >> aLineSecond; + return XSDRAW::GetList (aLineFirst.c_str(), aLineSecond.c_str()); + } } -// return IFSelect_Functions::GiveList (Session(),first,second); return IFSelect_Functions::GiveList (Session(),first,second); }