Commits

Steve Borho  committed 4975766

shelve: use a "null" patchctx when no shelves are available

This prevents the filelistview from becoming confused and properly emits all
the appropriate diffbrowser signals.

  • Participants
  • Parent commits f6eb274

Comments (0)

Files changed (1)

File tortoisehg/hgqt/shelve.py

                 return
             else:
                 open(fn, 'wb').write('')
+                self.showMessage(_('New shelf created'))
         except EnvironmentError, e:
             self.showMessage(hglib.tounicode(str(e)))
         self.refreshCombos()
         self.combob.addItems(patches)
         if not patches:
             self.delShelfButtonB.setEnabled(False)
-            self.browseb.fileSelected.emit(False)
-            self.browseb.chunksSelected.emit(False)
+            self.browseb.setContext(patchctx('', self.repo, None))
 
     @pyqtSlot(int)
     def comboAChanged(self, index):