Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grow vertical space in clone details list to fit full message #279

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions koordinates/gui/task_progress_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
QHBoxLayout,
QLabel,
QTableView,
QDialog
QDialog,
QAbstractItemView
)
from qgis.gui import QgsGui

Expand Down Expand Up @@ -60,6 +61,7 @@ def __init__(self,

hl = QHBoxLayout()
self.details_label = QLabel()
self.details_label.setWordWrap(True)
hl.addWidget(self.details_label, 1)
self.retry_button = QPushButton(self.tr('Retry'))
hl.addWidget(self.retry_button)
Expand All @@ -70,7 +72,6 @@ def __init__(self,
self.details_label.hide()
self.retry_button.hide()

self.setMinimumHeight(self.sizeHint().height())
self.update_from_model()

def update_from_model(self):
Expand Down Expand Up @@ -115,6 +116,8 @@ def update_from_model(self):
self.retry_button.show()
self.progress_bar.hide()
self.cancel_button.hide()
self.setMinimumHeight(self.sizeHint().height())
self.updateGeometry()

def _cancel(self):
"""
Expand All @@ -140,6 +143,7 @@ def __init__(self,
super().__init__(parent)
self._manager = operations_manager
self.setModel(self._manager)
self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
self.horizontalHeader().setStretchLastSection(True)
self.horizontalHeader().setVisible(False)
self.verticalHeader().setVisible(False)
Expand Down Expand Up @@ -177,6 +181,7 @@ def _data_changed(self,
continue

widget.update_from_model()
self.setRowHeight(row, widget.minimumHeight())


class TaskDetailsDialog(QDialog):
Expand Down