Index: invariantview/perspectives/invariant/invariant.py
===================================================================
--- invariantview/perspectives/invariant/invariant.py	(revision d31861656423d9c9c1b26f48c041f98728550940)
+++ invariantview/perspectives/invariant/invariant.py	(revision f24925abc18448da5be24b908787806cf85a9aa5)
@@ -47,7 +47,4 @@
         #  for your plug-in. This defines your plug-in "perspective"
         self.perspective = []
-        
-        # is this data from *.inv file?
-        self.is_state_data = False
         
         self.state_reader = None   
@@ -238,7 +235,6 @@
         if data is None:
             return 
-        if self.is_state_data:
-            self.is_state_data = False
-        else:
+        # set current data if not it's a state data
+        if not self.invariant_panel.is_state_data:
             # Store reference to data
             self.__data = data
@@ -253,8 +249,6 @@
         :param state: invariant state 
         """     
-        
         # Write the state to file
         # First, check that the data is of the right type
-
         current_plottable = self.__data
 
@@ -280,20 +274,16 @@
             self.__data.group_id = datainfo.filename
             self.__data.id = datainfo.filename
-            
+
             temp_state = copy.deepcopy(state)
-            
+            # set state
+            self.invariant_panel.is_state_data = True
             # Load the invariant states
             # Make sure the user sees the invariant panel after loading
             self.parent.set_perspective(self.perspective)
-            # set state
-            self.is_state_data = True 
-            self.invariant_panel.is_state_data = True
-            self.invariant_panel.set_state(state=temp_state,data=self.__data)
-                       
+            self.invariant_panel.set_state(state=temp_state,data=self.__data)         
 
         except:
             logging.error("invariant.set_state: %s" % sys.exc_value)
-        
-    
+
         
     def plot_theory(self, data=None, name=None):
Index: invariantview/perspectives/invariant/invariant_panel.py
===================================================================
--- invariantview/perspectives/invariant/invariant_panel.py	(revision 0399c78d39f35d0463730f6171c632096a2d1fec)
+++ invariantview/perspectives/invariant/invariant_panel.py	(revision f24925abc18448da5be24b908787806cf85a9aa5)
@@ -81,6 +81,6 @@
         # default flags for state
         self.new_state = False
+        self.is_state_data = False
         self.is_power_out = False
-        self.is_state_data = False
 
         #container of invariant value
@@ -117,15 +117,14 @@
     def on_select_data(self, event=None):
         """
-        On select data by combobox or contextmenu or by set_data
+        On select data by combobox or by set_data
         """
         if event !=None:
+            self.state
             n = self.data_cbbox.GetCurrentSelection()
+            self.data_cbbox.SetSelection(n)
             data, path = self.data_cbbox.GetClientData(n)
-            #warning message for losing all the calculation and states
             if self._data !=None:
-                if self._data.name != data.name:
-                    if self._show_message():
-                        self._manager.compute_helper(data=data)
-                        data = self._data
+                self._manager.compute_helper(data=data)
+                data = self._data
             return
         
@@ -149,5 +148,5 @@
             return 
 
-        count_bf = self.data_cbbox.GetCount()
+        #count_bf = self.data_cbbox.GetCount()
         for data, path in list:
             if data.__class__.__name__ != "Data2D" and \
@@ -158,12 +157,16 @@
                 
         count = self.data_cbbox.GetCount()
-        if count >0:
-            # set data only on the first or state data            
-            if count ==1 or self.is_state_data:
-                self.data_cbbox.Enable()
-                self._data = data
-                self.on_select_data(event=None)
-                self.is_state_data = False
-                
+        if count > 0:
+            self.data_cbbox.Enable()
+            # reset data (cb) only on the first data            
+            if count ==1:
+                try:
+                    #check if the data is from inv file
+                    self._data.meta_data['invstate'].file
+                except:
+                    self._data = data
+                    self.on_select_data(event=None)
+            
+    #data = self._data    
         title = "Untitled"
         if hasattr(data,"title"):
@@ -174,4 +177,9 @@
             title = str(data.name)
 
+        if self.is_state_data:
+            self.data_cbbox.SetValue(title)
+        self.data_cbbox.Enable(True)
+        self.is_state_data = False
+             
         wx.PostEvent(self.parent, NewPlotEvent(plot=data, title=title))
             
@@ -206,6 +214,6 @@
                                        item=data.name)
             else:
-                pos = self.data_cbbox.FindString(data.name)
-                self.data_cbbox.SetSelection(pos)
+                position = self.data_cbbox.FindString(data.name)
+            self.data_cbbox.SetSelection(position)
 
             self.data_min_tcl.SetLabel(str(data_qmin))
@@ -251,7 +259,7 @@
             self.state = IState()
         else:
+            self.new_state = True
             if not self.set_current_data(data, path=None):
                 return
-            self.new_state = True
             self.state = state   
             
@@ -282,4 +290,5 @@
             self.state.data = self._data
             self.new_state = False 
+            self.is_state_data = False
 
             
@@ -1174,4 +1183,6 @@
         Show warning message when resetting data
         """
+        # no message for now
+        return True
         count_bf = self.data_cbbox.GetCount()
         if count_bf > 1:
