File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ public slots:
6969 QList<QString> *props;
7070 QTimer *refreshTimer;
7171
72+ QBool stateDirty = false ;
73+
7274public:
7375 qint8 getNumber () { return this ->number ; }
7476
@@ -99,6 +101,8 @@ public slots:
99101
100102 if (address.mid (7 , 6 ) == " config" ) {
101103 if (address.mid (14 , 4 ) == " name" ) {
104+ this ->stateDirty = true ;
105+
102106 QString name = data.getValue (0 )->toString ();
103107 name.remove (' "' );
104108 name.remove (' "' );
@@ -109,6 +113,8 @@ public slots:
109113
110114 if (address.mid (7 , 3 ) == " mix" ) {
111115 if (address.mid (11 ,2 ) == " on" ) {
116+ this ->stateDirty = true ;
117+
112118 bool isOn;
113119 QString isOnTmp = data.getValue (0 )->toString ();
114120
@@ -125,7 +131,10 @@ public slots:
125131 }
126132 }
127133
128- emit updated (this );
134+ if (this ->stateDirty ) {
135+ emit updated (this );
136+ this ->stateDirty = false ;
137+ }
129138
130139 console->removeMessage (data);
131140 }
You can’t perform that action at this time.
0 commit comments