Code Duplication    Length = 13-16 lines in 2 locations

client/pygameui/MetaWidget.py 1 location

@@ 225-240 (lines=16) @@
222
    def onMouseOut(self):
223
        pass
224
225
    def __setattr__(self, name, value):
226
        #@name = intern(name)
227
        dict = self.__dict__
228
        if value == dict.get(name, Const.NoValue):
229
            return
230
        dict[name] = value
231
        if name == 'visible' and self.parent:
232
            #@print 'set', self, name , value
233
            self.parent.redraw(self, 1)
234
            dict['_changeReported'] = 1
235
        elif name[0] != '_':
236
            #@print 'set', self, name , value
237
            self.__dict__['redrawMyself'] = 1
238
            if self.parent and not self._changeReported:
239
                self.parent.redraw(self)
240
                dict['_changeReported'] = 1
241

client/pygameui/Widget.py 1 location

@@ 165-177 (lines=13) @@
162
        self.parent.redraw(self)
163
        self.__dict__['_changeReported'] = 1
164
165
    def __setattr__(self, name, value):
166
        #@name = intern(name)
167
        dict = self.__dict__
168
        if value == dict.get(name, Const.NoValue):
169
            return
170
        dict[name] = value
171
        if name == 'visible' and self.parent:
172
            self.parent.redraw(self, 1)
173
            dict['_changeReported'] = 1
174
            #@print 'set', self, name , value
175
        elif not self._changeReported and name[0] != '_' and self.parent:
176
            self.parent.redraw(self)
177
            dict['_changeReported'] = 1
178
            #@print 'set', self, name , value
179
180
    def set(self, **kwargs):