Commits

Yuya Nishihara committed 4bad335

manifestmodel: skip extra creation of folder icon for subrepo node

Comments (0)

Files changed (1)

tortoisehg/hgqt/manifestmodel.py

         return ic
 
     def _makeFileIcon(self, e):
-        if e.isdir:
+        if e.status == 'S' and e.subkind in _subrepoType2IcoMap:
+            ic = qtlib.geticon(_subrepoType2IcoMap[e.subkind])
+        elif e.isdir:
             ic = self._fileiconprovider.icon(QFileIconProvider.Folder)
         else:
             # assumes file still exists in wdir; otherwise falls back to default
         st = status.statusTypes[e.status]
         if st.icon:
             icOverlay = qtlib.geticon(st.icon[:-4])
-            if e.status == 'S':
-                if e.subkind in _subrepoType2IcoMap:
-                    ic = qtlib.geticon(_subrepoType2IcoMap[e.subkind])
             ic = qtlib.getoverlaidicon(ic, icOverlay)
 
         return ic