Skip to content

Commit

Permalink
- Fix null pointer exception when editing a records with no subrecords
Browse files Browse the repository at this point in the history
- Various recordstructure.xml updates
- Fix issue with duplicates in navigation history
  • Loading branch information
figment committed Feb 9, 2012
1 parent 0a39014 commit 8ece891
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 24 deletions.
10 changes: 8 additions & 2 deletions ObjectControls/PluginTreeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
Expand Down Expand Up @@ -520,8 +521,13 @@ private void PluginTree_SizeChanged(object sender, EventArgs e)

private void PluginTree_SelectedIndexChanged(object sender, EventArgs e)
{
if (_historyHandler.CurrentItem != PluginTree.SelectedRecord)
_historyHandler.CurrentItem = PluginTree.SelectedRecord;
if (PluginTree.SelectedRecord != null)
{
if (_historyHandler.CurrentItem == null && !PluginTree.SelectedRecord.Equals(_historyHandler.CurrentItem))
{
_historyHandler.CurrentItem = PluginTree.SelectedRecord;
}
}
RebuildSelection();
}

Expand Down
1 change: 1 addition & 0 deletions ObjectControls/SubrecordListEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ public void EditSelectedSubrecord()
else if (!Properties.Settings.Default.UseHexSubRecordEditor
&& sr.Structure != null
&& sr.Structure.elements != null
&& sr.Structure.elements.Length > 0
&& sr.Structure.elements[0].type != ElementValueType.Blob && !sr.Structure.UseHexEditor)
{
Form re;
Expand Down
5 changes: 5 additions & 0 deletions README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Requirements:
.NET 3.5

Change Log:
v 4.2
- Fix null pointer exception when editing a records with no subrecords
- Various recordstructure.xml updates
- Fix issue with duplicates in navigation history

v 4.1
- Fixed issues with MGEF (signed vs unsigned values)
- Added Copy & "Copy To" to search window
Expand Down
2 changes: 1 addition & 1 deletion build/buildver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.4418.3
4.2.4421.0
46 changes: 25 additions & 21 deletions conf/RecordStructure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,14 @@
<Element name="ID" type="formid" reftype="MOVT" />
</Subrecord>
<Subrecord name="SPED" desc="SPED" size="44">
<Element name="Strafe Walk Speed?" type="float" />
<Element name="Strafe Run Speed?" type="float" />
<Element name="Turn Walk Speed?" type="float" />
<Element name="Turn Run Speed?" type="float" />
<Element name="Walking Speed" type="float" />
<Element name="Running Speed" type="float" />
<Element name="Back Walk Speed?" type="float" />
<Element name="Back Run Speed?" type="float" />
<Element name="Strafe 1 Min Speed" type="float" />
<Element name="Strafe 1 Max Speed" type="float" />
<Element name="Strafe 2 Min Speed" type="float" />
<Element name="Strafe 2 Max Speed" type="float" />
<Element name="Forward Min Speed" type="float" />
<Element name="Forward Max Speed" type="float" />
<Element name="Back Min Speed" type="float" />
<Element name="Back Max Speed" type="float" />
<Element name="Direction 1?" type="float" />
<Element name="Direction 2?" type="float" />
<Element name="Direction 3?" type="float" />
Expand Down Expand Up @@ -4078,7 +4078,7 @@
<Group id="CONDITIONAL" optional="1" repeat="1"/>
</Group>
<Subrecord name="EPFT" desc="Extra Data Type" optional="1" repeat="1" size="1">
<Element name="EFP Type - 1=float 2=8 byte struct 3=FormID 4=script? 5=Spell 6=ZString 7=lString->" type="byte" options="float;1;8bytestruct;2;formid;3;script;4;spell;5;string;6;lstring;7" condid="2" />
<Element name="EFP Type" type="byte" options="float;1;8bytestruct;2;formid;3;script;4;spell;5;string;6;lstring;7" condid="2" desc="1=float 2=8 byte struct 3=FormID 4=script? 5=Spell 6=ZString 7=lString"/>
</Subrecord>
<Subrecord name="EPF2" desc="==> Script Data 2 ??" optional="1" repeat="1" size="4">
<Element name="EPF2" type="lstring" />
Expand Down Expand Up @@ -4454,11 +4454,15 @@
<Subrecord name="EDID" desc="Editor ID">
<Element name="Name" type="string" />
</Subrecord>
<Subrecord name="DATA" desc="DATA" optional="1" notininfo="1">
<Element name="Unknown" type="blob" />
<Subrecord name="DATA" desc="ECZN Data" optional="1">
<Element name="ID" type="formid" reftype="FACT" />
<Element name="ID" type="formid" reftype="LCTN" />
<Element name="Unknown" type="byte" />
<Element name="Zone Level" type="byte" />
<Element name="Unknown" type="byte" />
<Element name="Unknown" type="byte" />
</Subrecord>
</Record>

<Record name="LCTN" desc="Location">
<Subrecord name="EDID" desc="Editor ID">
<Element name="Name" type="string" />
Expand Down Expand Up @@ -4985,15 +4989,15 @@
<Subrecord name="MNAM" desc="MNAM" optional="1">
<Element name="Name" type="string" />
</Subrecord>
<Subrecord name="SPED" desc="SPED" optional="1">
<Element name="Strafe Walk Speed?" type="float" />
<Element name="Strafe Run Speed?" type="float" />
<Element name="Turn Walk Speed?" type="float" />
<Element name="Turn Run Speed?" type="float" />
<Element name="Walking Speed" type="float" />
<Element name="Running Speed" type="float" />
<Element name="Back Walk Speed?" type="float" />
<Element name="Back Run Speed?" type="float" />
<Subrecord name="SPED" desc="SPED" size="44">
<Element name="Strafe 1 Min Speed" type="float" />
<Element name="Strafe 1 Max Speed" type="float" />
<Element name="Strafe 2 Min Speed" type="float" />
<Element name="Strafe 2 Max Speed" type="float" />
<Element name="Forward Min Speed" type="float" />
<Element name="Forward Max Speed" type="float" />
<Element name="Back Min Speed" type="float" />
<Element name="Back Max Speed" type="float" />
<Element name="Direction 1?" type="float" />
<Element name="Direction 2?" type="float" />
<Element name="Direction 3?" type="float" />
Expand Down

0 comments on commit 8ece891

Please sign in to comment.