Commit 68bcb56c authored by konovalovsergey's avatar konovalovsergey

fix bug 33339, 33340

parent 15f23675
...@@ -213,14 +213,8 @@ RgbColor.prototype = ...@@ -213,14 +213,8 @@ RgbColor.prototype =
return 1; return 1;
} }
}; };
var g_oThemeColorProperties = {
rgb: 0,
theme: 1,
tint: 2
};
function ThemeColor() function ThemeColor()
{ {
this.Properties = g_oThemeColorProperties;
this.rgb = null; this.rgb = null;
this.theme = null; this.theme = null;
this.tint = null; this.tint = null;
...@@ -229,30 +223,14 @@ ThemeColor.prototype = ...@@ -229,30 +223,14 @@ ThemeColor.prototype =
{ {
clone : function() clone : function()
{ {
var res = new ThemeColor(); //ThemeColor must be created by g_oColorManager for correct rebuild
res.rgb = this.rgb; //no need getThemeColor because it return same object
res.theme = this.theme; return this;
res.tint = this.tint;
return res;
}, },
getType : function() getType : function()
{ {
return UndoRedoDataTypes.ThemeColor; return UndoRedoDataTypes.ThemeColor;
}, },
getProperties : function()
{
return this.Properties;
},
getProperty : function(nType)
{
switch(nType)
{
case this.Properties.rgb:return this.rgb;break;
case this.Properties.theme:return this.theme;break;
case this.Properties.tint:return this.tint;break;
}
},
isEqual: function(oColor) isEqual: function(oColor)
{ {
if(!oColor){ if(!oColor){
...@@ -266,16 +244,6 @@ ThemeColor.prototype = ...@@ -266,16 +244,6 @@ ThemeColor.prototype =
} }
return true; return true;
}, },
setProperty : function(nType, value)
{
switch(nType)
{
case this.Properties.rgb: this.rgb = value;break;
case this.Properties.theme: this.theme= value;break;
case this.Properties.tint: this.tint = value;break;
}
},
Write_ToBinary2 : function(oBinaryWriter) Write_ToBinary2 : function(oBinaryWriter)
{ {
oBinaryWriter.WriteByte(this.theme); oBinaryWriter.WriteByte(this.theme);
......
Markdown is supported
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