1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-642 Hopefully fixed color and highlight time bug that occurred after changing categorized node mode.

This commit is contained in:
Fredrik Arvidsson 2012-07-08 16:17:59 +02:00
parent d83bff100b
commit 3c32490f7e
2 changed files with 13 additions and 4 deletions

View File

@ -86,6 +86,10 @@ void UAVObjectBrowserWidget::categorize(bool categorize)
UAVObjectTreeModel* tmpModel = m_model;
m_model = new UAVObjectTreeModel(0, categorize);
m_model->setRecentlyUpdatedColor(m_recentlyUpdatedColor);
m_model->setManuallyChangedColor(m_manuallyChangedColor);
m_model->setRecentlyUpdatedTimeout(m_recentlyUpdatedTimeout);
m_model->setOnlyHilightChangedValues(m_onlyHilightChangedValues);
m_browser->treeView->setModel(m_model);
delete tmpModel;

View File

@ -45,10 +45,10 @@ class UAVObjectBrowserWidget : public QWidget
public:
UAVObjectBrowserWidget(QWidget *parent = 0);
~UAVObjectBrowserWidget();
void setRecentlyUpdatedColor(QColor color) { m_model->setRecentlyUpdatedColor(color); }
void setManuallyChangedColor(QColor color) { m_model->setManuallyChangedColor(color); }
void setRecentlyUpdatedTimeout(int timeout) { m_model->setRecentlyUpdatedTimeout(timeout); }
void setOnlyHilightChangedValues(bool hilight) { m_model->setOnlyHilightChangedValues(hilight); }
void setRecentlyUpdatedColor(QColor color) { m_recentlyUpdatedColor = color; m_model->setRecentlyUpdatedColor(color); }
void setManuallyChangedColor(QColor color) { m_manuallyChangedColor = color; m_model->setManuallyChangedColor(color); }
void setRecentlyUpdatedTimeout(int timeout) { m_recentlyUpdatedTimeout = timeout; m_model->setRecentlyUpdatedTimeout(timeout); }
void setOnlyHilightChangedValues(bool hilight) { m_onlyHilightChangedValues = hilight; m_model->setOnlyHilightChangedValues(hilight); }
public slots:
@ -69,6 +69,11 @@ private:
Ui_UAVObjectBrowser *m_browser;
UAVObjectTreeModel *m_model;
int m_recentlyUpdatedTimeout;
QColor m_recentlyUpdatedColor;
QColor m_manuallyChangedColor;
bool m_onlyHilightChangedValues;
void updateObjectPersistance(ObjectPersistence::OperationOptions op, UAVObject *obj);
void enableSendRequest(bool enable);
ObjectTreeItem *findCurrentObjectTreeItem();