File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -293,26 +293,26 @@ def __init__(self, view):
293293
294294 def createEditor (self , parent , option , index ):
295295 class Combo (QComboBox ):
296- def __init__ (self , parent , initial_data ):
296+ def __init__ (self , parent , initial_data , view ):
297297 super ().__init__ (parent )
298298 model = itemmodels .ContinuousPalettesModel (icon_width = 128 )
299299 self .setModel (model )
300300 self .setCurrentIndex (model .indexOf (initial_data ))
301301 self .setIconSize (QSize (128 , 16 ))
302302 QTimer .singleShot (0 , self .showPopup )
303+ self .view = view
303304
304305 def hidePopup (self ):
305306 super ().hidePopup ()
306- view .closeEditor (self , ColorStripDelegate .NoHint )
307+ self . view .closeEditor (self , ColorStripDelegate .NoHint )
307308
308309 def select (i ):
309310 self .view .model ().setData (
310311 index ,
311312 combo .model ().index (i , 0 ).data (Qt .UserRole ),
312313 ColorRole )
313314
314- view = self .view
315- combo = Combo (parent , index .data (ColorRole ))
315+ combo = Combo (parent , index .data (ColorRole ), self .view )
316316 combo .currentIndexChanged [int ].connect (select )
317317 return combo
318318
You can’t perform that action at this time.
0 commit comments