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):
return self._files[row]['path']
def setContext(self, ctx):
self.contextChanged.emit(ctx)
if ctx != self._ctx:
self._fulllist = False
self._ctx = ctx
self.loadFiles()
self.layoutChanged.emit()
self.contextChanged.emit(ctx)
def flagFromIndex(self, index):
if not index.isValid() or index.row()>=len(self) or not self._ctx:
......
......@@ -68,7 +68,11 @@ class HgFileListView(QTableView):
self._actions[act].setEnabled(real)
for act in ['diff', 'revert']:
self._actions[act].setEnabled(real or wd)
self.actionShowAllMerge.setVisible(len(ctx.parents()) == 2)
if len(ctx.parents()) == 2:
self.actionShowAllMerge.setVisible(True)
else:
self.actionShowAllMerge.setVisible(False)
self.actionShowAllMerge.setChecked(False)
def currentFile(self):
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