* Add prim ClickAction persistence to SQLite 
* This will require a prebuild
* Thanks nlin!
0.6.0-stable
Justin Clarke Casey 2008-09-12 20:37:07 +00:00
parent 52a4c4d82f
commit 2fcc131ef3
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,5 @@
BEGIN;
ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
COMMIT;

View File

@ -717,6 +717,9 @@ namespace OpenSim.Data.SQLite
createCol(prims, "SitTargetOrientY", typeof (Double)); createCol(prims, "SitTargetOrientY", typeof (Double));
createCol(prims, "SitTargetOrientZ", typeof (Double)); createCol(prims, "SitTargetOrientZ", typeof (Double));
// click action
createCol(prims, "ClickAction", typeof (Byte));
// Add in contraints // Add in contraints
prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]};
@ -991,6 +994,7 @@ namespace OpenSim.Data.SQLite
} }
prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"])); prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"]));
prim.ClickAction = Convert.ToByte(row["ClickAction"]);
return prim; return prim;
} }
@ -1239,6 +1243,9 @@ namespace OpenSim.Data.SQLite
row["ColorG"] = Convert.ToInt32(prim.Color.G); row["ColorG"] = Convert.ToInt32(prim.Color.G);
row["ColorB"] = Convert.ToInt32(prim.Color.B); row["ColorB"] = Convert.ToInt32(prim.Color.B);
row["ColorA"] = Convert.ToInt32(prim.Color.A); row["ColorA"] = Convert.ToInt32(prim.Color.A);
// click action
row["ClickAction"] = prim.ClickAction;
} }
/// <summary> /// <summary>