diff --git a/ba/ba1102.cpp b/ba/ba1102.cpp index bce249b3c..6d1d556ec 100755 --- a/ba/ba1102.cpp +++ b/ba/ba1102.cpp @@ -80,8 +80,7 @@ bool TEdit_file::browse(int logicnum, const TFilename& name, const TString& tab) if (!pind) { - pind = new TProgind(sheet.checked(),"Attendere...", - TRUE, TRUE, 32); + pind = new TProgind(sheet.checked(),"Attendere...", TRUE, TRUE, 32); pind->addstatus(1); } else @@ -97,10 +96,18 @@ bool TEdit_file::browse(int logicnum, const TFilename& name, const TString& tab) if (pind) delete pind; cursor.freeze(FALSE); - if (first) {sheet.select(1); continue;} + if (first) + { + if (cursor.items() > 0) + sheet.select(1); + continue; + } } if (ch == K_ENTER || ch == K_DEL) - cursor = sheet.selected(); + { + if (cursor.items() > 0) + cursor = sheet.selected(); + } switch(ch) {