Skip to content
Snippets Groups Projects
Commit be8fb5d0 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

improve checks and errmsgs in zcoord_delete (mz-)

parent 0d3621a9
No related branches found
No related tags found
No related merge requests found
...@@ -904,7 +904,9 @@ void NManip::zcoord_delete() ...@@ -904,7 +904,9 @@ void NManip::zcoord_delete()
RObjVecInt vsel = Tsel->to_index_list( fin->ZCo.size() ); RObjVecInt vsel = Tsel->to_index_list( fin->ZCo.size() );
if (!vsel) if (!vsel)
throw S("not a valid index list"); throw "Invalid index list '"+sel+"'; max index is "+S(fin->ZCo.size()-1);
if ( fin->nJ()>1 && fin->ZCo.size()-vsel->size()<1 )
throw "Cannot delete all z coordinates since there is more than one slice";
vector<int> lis = vsel->v; vector<int> lis = vsel->v;
sort( lis.begin(), lis.end() ); sort( lis.begin(), lis.end() );
reverse( lis.begin(), lis.end() ); reverse( lis.begin(), lis.end() );
......
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