Commit 5cfa0196 authored by Steve Borho's avatar Steve Borho
Browse files

filelistview: improve behavior of actionShowAllMerge

parent 51b0b2fc4605
...@@ -65,12 +65,11 @@ class HgFileListModel(QAbstractTableModel): ...@@ -65,12 +65,11 @@ class HgFileListModel(QAbstractTableModel):
return self._files[row]['path'] return self._files[row]['path']
def setContext(self, ctx): def setContext(self, ctx):
if ctx != self._ctx: if ctx != self._ctx:
self._fulllist = False
self._ctx = ctx self._ctx = ctx
self.loadFiles() self.loadFiles()
self.layoutChanged.emit() self.layoutChanged.emit()
def flagFromIndex(self, index): def flagFromIndex(self, index):
if not index.isValid() or index.row()>=len(self) or not self._ctx: if not index.isValid() or index.row()>=len(self) or not self._ctx:
...@@ -68,7 +68,11 @@ class HgFileListView(QTableView): ...@@ -68,7 +68,11 @@ class HgFileListView(QTableView):
self._actions[act].setEnabled(real) self._actions[act].setEnabled(real)
for act in ['diff', 'revert']: for act in ['diff', 'revert']:
self._actions[act].setEnabled(real or wd) self._actions[act].setEnabled(real or wd)
self.actionShowAllMerge.setVisible(len(ctx.parents()) == 2) if len(ctx.parents()) == 2:
def currentFile(self): def currentFile(self):
index = self.currentIndex() index = self.currentIndex()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment