From 2ed5422b76c9eb1c44165b6cb2616778a3ab1f46 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (laptop)" <j.wuttke@fz-juelich.de> Date: Tue, 22 Dec 2009 12:24:26 +0100 Subject: [PATCH] JAsk auch wenn nJ nicht einheitlich --- pub/src/olm.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pub/src/olm.cpp b/pub/src/olm.cpp index 4db0d6fa..66c138f7 100644 --- a/pub/src/olm.cpp +++ b/pub/src/olm.cpp @@ -182,18 +182,16 @@ void NOlm::JSelAsk( string quest, string *jSel, CList *jLis ) if ( FSel.size()<=0 ) throw string( "query scan selection: no files to operate on" ); - uint nJ = MOM[FSel.V[0]].nScan(); - IterateEle iter; CEle *e; + uint nJmax = 0; while ( (e=iter()) ) - if ( e->nScan()!=nJ ) - throw string( "files have different numbers of scans" ); + nJmax = max( nJmax, e->nScan() ); - if ( nJ==1 ) + if ( nJmax==1 ) *jLis = CList("0"); else { *jSel = wask( quest, *jSel ); - *jLis = CList ( *jSel, 0, nJ-1 ); + *jLis = CList ( *jSel, 0, nJmax-1 ); } } -- GitLab