Commit cb367f68 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

adding a warning if you try to display data for a variable with more than 2 dimensions

parent c8311074
......@@ -241,8 +241,16 @@ class GlanceGUIController (object) :
"""
# show the data for whatever's loaded
self.stats.sendRawData(A_CONST)
self.stats.sendRawData(B_CONST)
try :
self.stats.sendRawData(A_CONST)
except ValueError as ve :
self.handleWarning(str(ve))
try :
self.stats.sendRawData(B_CONST)
except ValueError as ve :
self.handleWarning(str(ve))
def userRequestsGlobalAttrs (self) :
"""
......
......@@ -963,8 +963,9 @@ class GlanceGUIView (QWidget) :
stored_in=self.infoWindows)
else:
LOG.debug("Unable to display data for variable " + variableName + " because it's shape of "
+ str(variableDataObject.data.shape) + " will not work in display window.")
raise ValueError ("Unable to display data for variable " + variableName + " because it's shape of "
+ str(variableDataObject.data.shape) + " will not fit in display window "
"control structure.")
def fileDataUpdate (self, file_prefix, file_path, selected_variable, use_fill_override, new_fill_value, variable_dimensions,
variable_list=None, attribute_list=None) :
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment