diff src/graphics.cc @ 9972:d32a6cc0193b

unshare dynamic properties
author John W. Eaton <jwe@octave.org>
date Fri, 11 Dec 2009 21:42:02 -0500
parents 3ec3b8e80b67
children 33ba83a06a42
line wrap: on
line diff
--- a/src/graphics.cc	Fri Dec 11 20:59:27 2009 -0500
+++ b/src/graphics.cc	Fri Dec 11 21:42:02 2009 -0500
@@ -1804,26 +1804,22 @@
   return m;
 }
 
-std::map<std::string, std::set<std::string> > base_properties::all_dynamic_properties;
-
 std::set<std::string>
-base_properties::dynamic_property_names (const std::string& cname)
-{
-  return all_dynamic_properties[cname];
+base_properties::dynamic_property_names (void) const
+{
+  return dynamic_properties;
 }
 
 bool
-base_properties::has_dynamic_property (const std::string& pname,
-				       const std::string& cname)
-{
-  const std::set<std::string>& dynprops = dynamic_property_names (cname);
+base_properties::has_dynamic_property (const std::string& pname)
+{
+  const std::set<std::string>& dynprops = dynamic_property_names ();
 
   return dynprops.find (pname) != dynprops.end ();
 }
 
 void
 base_properties::set_dynamic (const caseless_str& pname,
-			      const std::string& cname,
 			      const octave_value& val)
 {
   std::map<caseless_str, property, cmp_caseless_str>::iterator it = all_props.find (pname);
@@ -1835,7 +1831,7 @@
 
   if (! error_state)
     {
-      all_dynamic_properties[cname].insert (pname);
+      dynamic_properties.insert (pname);
 
       mark_modified ();
     }