QTfrontend/itemNum.cpp
changeset 1886 0bb8f61e5630
parent 1455 7d0a4ecd8210
child 1904 20348675b015
--- a/QTfrontend/itemNum.cpp	Thu Mar 12 13:54:32 2009 +0000
+++ b/QTfrontend/itemNum.cpp	Thu Mar 12 13:55:47 2009 +0000
@@ -37,16 +37,20 @@
   if(nonInteractive) return;
   if(event->button()==Qt::LeftButton) {
     event->accept();
-    if(infinityState && numItems==maxItems) {
+    if((infinityState && numItems <= maxItems) || (!infinityState && numItems < maxItems)) {
       incItems();
-    }
-    if(numItems < maxItems) {
-      incItems();
+    } else {
+      numItems = minItems+1;
+      // appears there's an emit in there
+      decItems();
     }
   } else if (event->button()==Qt::RightButton) {
     event->accept();
     if(numItems > minItems) {
       decItems();
+    } else {
+      numItems = maxItems+(infinityState?0:-1);
+      incItems();
     }
   } else {
     event->ignore();