Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable fileview: disable toggle buttons when clearDisplay() is called

clearDisplay() is called by parent widgets when there is no file to
be displayed. We must disable the file mode toolbar because a mode
toggle will re-display the most recently displayed file.

Changeset 6da6c9c2f64a

Parent fdbbfe403d45

by Steve Borho

Changes to one file · Browse files at 6da6c9c2f64a Showing diff from parent fdbbfe403d45 Diff from another changeset...

 
253
254
255
 
256
 
 
 
 
 
257
258
259
 
271
272
273
274
 
275
276
277
 
253
254
255
256
257
258
259
260
261
262
263
264
265
 
277
278
279
 
280
281
282
283
@@ -253,7 +253,13 @@
  if rev != self._p_rev:   self.displayFile(rev=rev)   + @pyqtSlot()   def clearDisplay(self): + self._filename = None + self.forceMode('diff') + self.clearMarkup() + + def clearMarkup(self):   self.sci.clear()   self.blk.clear()   # Setting the label to ' ' rather than clear() keeps the label @@ -271,7 +277,7 @@
  if rev is not None:   self._p_rev = rev   - self.clearDisplay() + self.clearMarkup()   if filename is None:   self.forceMode('file')   return