Skip to content

Commit 53bd0da

Browse files
filnetf5soh
authored andcommitted
Merged in filnet/librepilot/LP-567_uavobjectbrowser_highlight_handling (pull request #486)
LP-567 uavobjectbrowser highlight handling Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Lalanne Laurent <f5soh@free.fr>
2 parents b0e3093 + 6e8f338 commit 53bd0da

18 files changed

Lines changed: 1126 additions & 800 deletions

ground/gcs/src/plugins/uavobjectbrowser/browseritemdelegate.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131

3232
BrowserItemDelegate::BrowserItemDelegate(QObject *parent) :
3333
QStyledItemDelegate(parent)
34-
{}
34+
{
35+
_sizeHint = QSpinBox().sizeHint();
36+
}
3537

3638
QWidget *BrowserItemDelegate::createEditor(QWidget *parent,
3739
const QStyleOptionViewItem & option,
@@ -75,5 +77,5 @@ QSize BrowserItemDelegate::sizeHint(const QStyleOptionViewItem & option, const Q
7577
{
7678
Q_UNUSED(option);
7779
Q_UNUSED(index);
78-
return QSpinBox().sizeHint();
80+
return _sizeHint;
7981
}

ground/gcs/src/plugins/uavobjectbrowser/browseritemdelegate.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class BrowserItemDelegate : public QStyledItemDelegate {
4747
const QStyleOptionViewItem &option, const QModelIndex &index) const;
4848
QSize sizeHint(const QStyleOptionViewItem & option,
4949
const QModelIndex &index) const;
50+
51+
private:
52+
QSize _sizeHint;
5053
};
5154

5255
#endif // BROWSERITEMDELEGATE_H

ground/gcs/src/plugins/uavobjectbrowser/fieldtreeitem.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)