Commits

Yuya Nishihara  committed 2f53457

manifest: use setMode(mode) to enable annotation

  • Participants
  • Parent commits 3b36159

Comments (0)

Files changed (1)

File tortoisehg/hgqt/manifestdialog.py

         """Set if search is case insensitive"""
         self._manifest_widget._fileview.searchbar.setCaseInsensitive(ignorecase)
 
+    def setFileViewMode(self, mode):
+        self._manifest_widget.setFileViewMode(mode)
+
     @pyqtSlot(unicode, dict)
     def _openSearchWidget(self, pattern, opts):
         opts = dict((str(k), str(v)) for k, v in opts.iteritems())
     def _updatecontent(self):
         self.displayFile()
 
+    def setFileViewMode(self, mode):
+        self._fileview.setMode(mode)
+
     @pyqtSlot()
     def _emitPathChanged(self):
         self.pathChanged.emit(self.path)
             dlg.setSource(hglib.tounicode(path), rev, line)
             if opts.get('pattern'):
                 dlg.setSearchPattern(opts['pattern'])
-            if dlg._manifest_widget._fileview.actionAnnMode.isEnabled():
-                dlg._manifest_widget._fileview.actionAnnMode.trigger()
+            dlg.setFileViewMode(fileview.AnnMode)
             if 'ignorecase' in opts:
                 dlg.setSearchCaseInsensitive(opts['ignorecase'])
         except IndexError: