diff options
-rw-r--r-- | src/ventoo/main.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ventoo/main.py b/src/ventoo/main.py index af22595..e3ee2c8 100644 --- a/src/ventoo/main.py +++ b/src/ventoo/main.py @@ -295,12 +295,14 @@ class MainWindow(gtk.Window): numNeeded = augeas_utils.matchDiff(thisMult, have) #add the required ones. for i in range(numNeeded): - created = model.append(modelPathIter, [True, osp.join(augeasFileRoot, str(have+i+1)), '-------']) + created = model.append(modelPathIter, [True, osp.join(augeasFileRoot, str(maxIndex+i+1)), '-------']) self.__buildEditModel(model, match, created, xmlRoot) have += 1 + maxIndex += 1 needOption = not augeas_utils.matchExact(thisMult, have) if needOption: - created = model.append(modelPathIter, [False, str(have+1), '-------']) + created = model.append(modelPathIter, [False, str(maxIndex+1), '-------']) + maxIndex += 1 else: listedNodes = [] #a list of nodes that we already found and know about. for child in xChildren: |