@@ -145,6 +145,14 @@ def _createOptionsBox(self):
145145 self .colorbyBox .currentTextChanged [str ].connect (
146146 self .main_window .editColorBy )
147147
148+ # Universe level (applies to cell coloring)
149+ self .universeLevelBox = QComboBox (self )
150+ self .universeLevelBox .addItem ('lowest' )
151+ for i in range (self .model .max_universe_levels ):
152+ self .universeLevelBox .addItem (str (i ))
153+ self .universeLevelBox .currentTextChanged [str ].connect (
154+ self .main_window .editUniverseLevel )
155+
148156 # Alpha
149157 self .domainAlphaBox = QDoubleSpinBox (self )
150158 self .domainAlphaBox .setValue (self .model .activeView .domainAlpha )
@@ -180,6 +188,7 @@ def _createOptionsBox(self):
180188 self .opLayout .addRow ('Height:' , self .heightBox )
181189 self .opLayout .addRow ('Basis:' , self .basisBox )
182190 self .opLayout .addRow ('Color By:' , self .colorbyBox )
191+ self .opLayout .addRow ('Universe Level' , self .universeLevelBox )
183192 self .opLayout .addRow ('Plot alpha:' , self .domainAlphaBox )
184193 self .opLayout .addRow ('Visible:' , self .visibilityBox )
185194 self .opLayout .addRow ('Outlines:' , self .outlinesBox )
@@ -250,6 +259,13 @@ def updateHeight(self):
250259
251260 def updateColorBy (self ):
252261 self .colorbyBox .setCurrentText (self .model .activeView .colorby )
262+ if self .model .activeView .colorby != 'cell' :
263+ self .universeLevelBox .setEnabled (False )
264+ else :
265+ self .universeLevelBox .setEnabled (True )
266+
267+ def updateUniverseLevel (self ):
268+ self .universeLevelBox .setCurrentIndex (self .model .activeView .level + 1 )
253269
254270 def updatePlotAlpha (self ):
255271 self .domainAlphaBox .setValue (self .model .activeView .domainAlpha )
0 commit comments