Skip to content
Snippets Groups Projects
Commit b8c8714b authored by inso's avatar inso
Browse files

Some fixes in tables

parent 9b176c32
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ class NetworkView(QWidget, Ui_NetworkWidget):
self.table_network.resizeColumnsToContents()
model.modelAboutToBeReset.connect(lambda: self.table_network.setEnabled(False))
model.modelReset.connect(lambda: self.table_network.setEnabled(True))
model.modelReset.connect(self.table_network.resizeColumnsToContents)
def manual_nodes_refresh(self):
self.button_manual_refresh.setEnabled(False)
......
......@@ -76,7 +76,7 @@ class TxHistoryController(ComponentController):
localized_amount = await self.model.received_amount(received_list)
text = self.tr("Received {amount} from {number} transfers").format(amount=localized_amount,
number=len(received_list))
if self.app.preferences['notifications']:
if self.model.notifications():
toast.display(self.tr("New transactions received"), text)
@once_at_a_time
......
......@@ -135,3 +135,6 @@ class TxHistoryModel(ComponentModel):
@property
def table_model(self):
return self._proxy
def notifications(self):
return self.app.preferences['notifications']
\ No newline at end of file
from PyQt5.QtWidgets import QWidget, QAbstractItemView, QHeaderView
from PyQt5.QtCore import QDateTime, QEvent
from PyQt5.QtCore import QDateTime, QEvent, Qt
from .txhistory_uic import Ui_TxHistoryWidget
......@@ -14,11 +14,6 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
self.busy_balance.hide()
self.progressbar.hide()
self.table_history.setSelectionBehavior(QAbstractItemView.SelectRows)
self.table_history.setSortingEnabled(True)
self.table_history.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
self.table_history.resizeColumnsToContents()
def get_time_frame(self):
"""
Get the time frame of date filters
......@@ -33,8 +28,12 @@ class TxHistoryView(QWidget, Ui_TxHistoryWidget):
:return:
"""
self.table_history.setModel(model)
self.table_history.setSelectionBehavior(QAbstractItemView.SelectRows)
self.table_history.setSortingEnabled(True)
self.table_history.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
model.modelAboutToBeReset.connect(lambda: self.table_history.setEnabled(False))
model.modelReset.connect(lambda: self.table_history.setEnabled(True))
model.modelReset.connect(self.table_history.resizeColumnsToContents)
async def set_minimum_maximum_datetime(self, minimum, maximum):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment