1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Yuya Nishihara  committed 4bad335

manifestmodel: skip extra creation of folder icon for subrepo node

  • Participants
  • Parent commits c1257b1
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/manifestmodel.py

View file
  • Ignore whitespace
         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