Fixed, Texture Browser form: "All" texture set was always selected when opening the form after closing it with this set selected.

Changed, Texture Browser form: texture groups list can now be resized.
Changed, Texture Browser form: selected group in texture groups list is now highlighted using highlight color even when not focused.
Changed, Linedef Info panel cosmetic: changed vertical position of texture name labels to match with the ones in the Sector Info panel.
This commit is contained in:
MaxED 2015-03-07 21:38:58 +00:00
parent 1d06e57750
commit 08e5599638
4 changed files with 72 additions and 34 deletions

View file

@ -445,7 +445,7 @@ namespace CodeImp.DoomBuilder.Controls
this.flowLayoutPanelFront.Location = new System.Drawing.Point(6, 14); this.flowLayoutPanelFront.Location = new System.Drawing.Point(6, 14);
this.flowLayoutPanelFront.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanelFront.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanelFront.Name = "flowLayoutPanelFront"; this.flowLayoutPanelFront.Name = "flowLayoutPanelFront";
this.flowLayoutPanelFront.Size = new System.Drawing.Size(484, 80); this.flowLayoutPanelFront.Size = new System.Drawing.Size(484, 82);
this.flowLayoutPanelFront.TabIndex = 13; this.flowLayoutPanelFront.TabIndex = 13;
this.flowLayoutPanelFront.WrapContents = false; this.flowLayoutPanelFront.WrapContents = false;
// //
@ -460,7 +460,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelFrontTop.Location = new System.Drawing.Point(0, 0); this.panelFrontTop.Location = new System.Drawing.Point(0, 0);
this.panelFrontTop.Margin = new System.Windows.Forms.Padding(0); this.panelFrontTop.Margin = new System.Windows.Forms.Padding(0);
this.panelFrontTop.Name = "panelFrontTop"; this.panelFrontTop.Name = "panelFrontTop";
this.panelFrontTop.Size = new System.Drawing.Size(160, 79); this.panelFrontTop.Size = new System.Drawing.Size(160, 82);
this.panelFrontTop.TabIndex = 5; this.panelFrontTop.TabIndex = 5;
// //
// frontTopUDMFOffsetLabel // frontTopUDMFOffsetLabel
@ -527,7 +527,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.fronthighname.AutoSize = true; this.fronthighname.AutoSize = true;
this.fronthighname.BackColor = System.Drawing.SystemColors.Control; this.fronthighname.BackColor = System.Drawing.SystemColors.Control;
this.fronthighname.Location = new System.Drawing.Point(3, 64); this.fronthighname.Location = new System.Drawing.Point(3, 67);
this.fronthighname.Name = "fronthighname"; this.fronthighname.Name = "fronthighname";
this.fronthighname.Size = new System.Drawing.Size(73, 13); this.fronthighname.Size = new System.Drawing.Size(73, 13);
this.fronthighname.TabIndex = 1; this.fronthighname.TabIndex = 1;
@ -545,7 +545,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelFrontMid.Location = new System.Drawing.Point(160, 0); this.panelFrontMid.Location = new System.Drawing.Point(160, 0);
this.panelFrontMid.Margin = new System.Windows.Forms.Padding(0); this.panelFrontMid.Margin = new System.Windows.Forms.Padding(0);
this.panelFrontMid.Name = "panelFrontMid"; this.panelFrontMid.Name = "panelFrontMid";
this.panelFrontMid.Size = new System.Drawing.Size(160, 79); this.panelFrontMid.Size = new System.Drawing.Size(160, 82);
this.panelFrontMid.TabIndex = 7; this.panelFrontMid.TabIndex = 7;
// //
// frontMidUDMFOffsetLabel // frontMidUDMFOffsetLabel
@ -612,7 +612,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.frontmidname.AutoSize = true; this.frontmidname.AutoSize = true;
this.frontmidname.BackColor = System.Drawing.SystemColors.Control; this.frontmidname.BackColor = System.Drawing.SystemColors.Control;
this.frontmidname.Location = new System.Drawing.Point(3, 64); this.frontmidname.Location = new System.Drawing.Point(3, 67);
this.frontmidname.Name = "frontmidname"; this.frontmidname.Name = "frontmidname";
this.frontmidname.Size = new System.Drawing.Size(73, 13); this.frontmidname.Size = new System.Drawing.Size(73, 13);
this.frontmidname.TabIndex = 3; this.frontmidname.TabIndex = 3;
@ -630,7 +630,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelFrontLow.Location = new System.Drawing.Point(320, 0); this.panelFrontLow.Location = new System.Drawing.Point(320, 0);
this.panelFrontLow.Margin = new System.Windows.Forms.Padding(0); this.panelFrontLow.Margin = new System.Windows.Forms.Padding(0);
this.panelFrontLow.Name = "panelFrontLow"; this.panelFrontLow.Name = "panelFrontLow";
this.panelFrontLow.Size = new System.Drawing.Size(160, 78); this.panelFrontLow.Size = new System.Drawing.Size(160, 82);
this.panelFrontLow.TabIndex = 12; this.panelFrontLow.TabIndex = 12;
// //
// frontBottomUDMFOffsetLabel // frontBottomUDMFOffsetLabel
@ -697,7 +697,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.frontlowname.AutoSize = true; this.frontlowname.AutoSize = true;
this.frontlowname.BackColor = System.Drawing.SystemColors.Control; this.frontlowname.BackColor = System.Drawing.SystemColors.Control;
this.frontlowname.Location = new System.Drawing.Point(3, 64); this.frontlowname.Location = new System.Drawing.Point(3, 67);
this.frontlowname.Name = "frontlowname"; this.frontlowname.Name = "frontlowname";
this.frontlowname.Size = new System.Drawing.Size(73, 13); this.frontlowname.Size = new System.Drawing.Size(73, 13);
this.frontlowname.TabIndex = 5; this.frontlowname.TabIndex = 5;
@ -723,7 +723,7 @@ namespace CodeImp.DoomBuilder.Controls
this.flowLayoutPanelBack.Controls.Add(this.panelBackLow); this.flowLayoutPanelBack.Controls.Add(this.panelBackLow);
this.flowLayoutPanelBack.Location = new System.Drawing.Point(6, 14); this.flowLayoutPanelBack.Location = new System.Drawing.Point(6, 14);
this.flowLayoutPanelBack.Name = "flowLayoutPanelBack"; this.flowLayoutPanelBack.Name = "flowLayoutPanelBack";
this.flowLayoutPanelBack.Size = new System.Drawing.Size(484, 80); this.flowLayoutPanelBack.Size = new System.Drawing.Size(484, 82);
this.flowLayoutPanelBack.TabIndex = 4; this.flowLayoutPanelBack.TabIndex = 4;
this.flowLayoutPanelBack.WrapContents = false; this.flowLayoutPanelBack.WrapContents = false;
// //
@ -738,7 +738,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelBackTop.Location = new System.Drawing.Point(0, 0); this.panelBackTop.Location = new System.Drawing.Point(0, 0);
this.panelBackTop.Margin = new System.Windows.Forms.Padding(0); this.panelBackTop.Margin = new System.Windows.Forms.Padding(0);
this.panelBackTop.Name = "panelBackTop"; this.panelBackTop.Name = "panelBackTop";
this.panelBackTop.Size = new System.Drawing.Size(160, 78); this.panelBackTop.Size = new System.Drawing.Size(160, 82);
this.panelBackTop.TabIndex = 5; this.panelBackTop.TabIndex = 5;
// //
// backTopUDMFOffsetLabel // backTopUDMFOffsetLabel
@ -805,7 +805,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.backhighname.AutoSize = true; this.backhighname.AutoSize = true;
this.backhighname.BackColor = System.Drawing.SystemColors.Control; this.backhighname.BackColor = System.Drawing.SystemColors.Control;
this.backhighname.Location = new System.Drawing.Point(3, 64); this.backhighname.Location = new System.Drawing.Point(3, 67);
this.backhighname.Name = "backhighname"; this.backhighname.Name = "backhighname";
this.backhighname.Size = new System.Drawing.Size(73, 13); this.backhighname.Size = new System.Drawing.Size(73, 13);
this.backhighname.TabIndex = 1; this.backhighname.TabIndex = 1;
@ -823,7 +823,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelBackMid.Location = new System.Drawing.Point(160, 0); this.panelBackMid.Location = new System.Drawing.Point(160, 0);
this.panelBackMid.Margin = new System.Windows.Forms.Padding(0); this.panelBackMid.Margin = new System.Windows.Forms.Padding(0);
this.panelBackMid.Name = "panelBackMid"; this.panelBackMid.Name = "panelBackMid";
this.panelBackMid.Size = new System.Drawing.Size(160, 78); this.panelBackMid.Size = new System.Drawing.Size(160, 82);
this.panelBackMid.TabIndex = 7; this.panelBackMid.TabIndex = 7;
// //
// backMidUDMFOffsetLabel // backMidUDMFOffsetLabel
@ -890,7 +890,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.backmidname.AutoSize = true; this.backmidname.AutoSize = true;
this.backmidname.BackColor = System.Drawing.SystemColors.Control; this.backmidname.BackColor = System.Drawing.SystemColors.Control;
this.backmidname.Location = new System.Drawing.Point(3, 64); this.backmidname.Location = new System.Drawing.Point(3, 67);
this.backmidname.Name = "backmidname"; this.backmidname.Name = "backmidname";
this.backmidname.Size = new System.Drawing.Size(73, 13); this.backmidname.Size = new System.Drawing.Size(73, 13);
this.backmidname.TabIndex = 3; this.backmidname.TabIndex = 3;
@ -908,7 +908,7 @@ namespace CodeImp.DoomBuilder.Controls
this.panelBackLow.Location = new System.Drawing.Point(320, 0); this.panelBackLow.Location = new System.Drawing.Point(320, 0);
this.panelBackLow.Margin = new System.Windows.Forms.Padding(0); this.panelBackLow.Margin = new System.Windows.Forms.Padding(0);
this.panelBackLow.Name = "panelBackLow"; this.panelBackLow.Name = "panelBackLow";
this.panelBackLow.Size = new System.Drawing.Size(160, 78); this.panelBackLow.Size = new System.Drawing.Size(160, 82);
this.panelBackLow.TabIndex = 12; this.panelBackLow.TabIndex = 12;
// //
// backBottomUDMFOffsetLabel // backBottomUDMFOffsetLabel
@ -975,7 +975,7 @@ namespace CodeImp.DoomBuilder.Controls
// //
this.backlowname.AutoSize = true; this.backlowname.AutoSize = true;
this.backlowname.BackColor = System.Drawing.SystemColors.Control; this.backlowname.BackColor = System.Drawing.SystemColors.Control;
this.backlowname.Location = new System.Drawing.Point(3, 64); this.backlowname.Location = new System.Drawing.Point(3, 67);
this.backlowname.Name = "backlowname"; this.backlowname.Name = "backlowname";
this.backlowname.Size = new System.Drawing.Size(73, 13); this.backlowname.Size = new System.Drawing.Size(73, 13);
this.backlowname.TabIndex = 5; this.backlowname.TabIndex = 5;

View file

@ -146,7 +146,7 @@ namespace CodeImp.DoomBuilder.Geometry
#region ================== Serialization #region ================== Serialization
// Serialize / deserialize // Serialize / deserialize
internal void ReadWrite(IReadWriteStream s) /*internal void ReadWrite(IReadWriteStream s)
{ {
if(s.IsWriting) if(s.IsWriting)
{ {
@ -183,7 +183,7 @@ namespace CodeImp.DoomBuilder.Geometry
sidedefindices = new int[c]; sidedefindices = new int[c];
for(int i = 0; i < c; i++) s.rInt(out sidedefindices[i]); for(int i = 0; i < c; i++) s.rInt(out sidedefindices[i]);
} }
} }*/
// After deserialization we need to find the actual sidedefs back // After deserialization we need to find the actual sidedefs back
internal void PostDeserialize(MapSet map) internal void PostDeserialize(MapSet map)

View file

@ -33,8 +33,12 @@ namespace CodeImp.DoomBuilder.Windows
this.cancel = new System.Windows.Forms.Button(); this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button();
this.smallimages = new System.Windows.Forms.ImageList(this.components); this.smallimages = new System.Windows.Forms.ImageList(this.components);
this.tvTextureSets = new System.Windows.Forms.TreeView(); this.tvTextureSets = new CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview();
this.browser = new CodeImp.DoomBuilder.Controls.ImageBrowserControl(); this.browser = new CodeImp.DoomBuilder.Controls.ImageBrowserControl();
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// cancel // cancel
@ -77,16 +81,20 @@ namespace CodeImp.DoomBuilder.Windows
// //
// tvTextureSets // tvTextureSets
// //
this.tvTextureSets.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tvTextureSets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tvTextureSets.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.tvTextureSets.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.tvTextureSets.HideSelection = false; this.tvTextureSets.HideSelection = false;
this.tvTextureSets.ImageIndex = 0; this.tvTextureSets.ImageIndex = 0;
this.tvTextureSets.ImageList = this.smallimages; this.tvTextureSets.ImageList = this.smallimages;
this.tvTextureSets.Location = new System.Drawing.Point(572, 12); this.tvTextureSets.Location = new System.Drawing.Point(0, 0);
this.tvTextureSets.Margin = new System.Windows.Forms.Padding(0);
this.tvTextureSets.Name = "tvTextureSets"; this.tvTextureSets.Name = "tvTextureSets";
this.tvTextureSets.SelectedImageIndex = 0; this.tvTextureSets.SelectedImageIndex = 0;
this.tvTextureSets.Size = new System.Drawing.Size(200, 390); this.tvTextureSets.SelectionBackColor = System.Drawing.SystemColors.Highlight;
this.tvTextureSets.SelectionMode = CodeImp.DoomBuilder.GZBuilder.Controls.TreeViewSelectionMode.SingleSelect;
this.tvTextureSets.Size = new System.Drawing.Size(199, 390);
this.tvTextureSets.TabIndex = 4; this.tvTextureSets.TabIndex = 4;
this.tvTextureSets.TabStop = false; this.tvTextureSets.TabStop = false;
this.tvTextureSets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tvTextureSets_KeyUp); this.tvTextureSets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tvTextureSets_KeyUp);
@ -94,20 +102,38 @@ namespace CodeImp.DoomBuilder.Windows
// //
// browser // browser
// //
this.browser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.browser.BrowseFlats = false; this.browser.BrowseFlats = false;
this.browser.Dock = System.Windows.Forms.DockStyle.Fill;
this.browser.HideInputBox = false; this.browser.HideInputBox = false;
this.browser.Location = new System.Drawing.Point(12, 12); this.browser.Location = new System.Drawing.Point(0, 0);
this.browser.Name = "browser"; this.browser.Name = "browser";
this.browser.PreventSelection = false; this.browser.PreventSelection = false;
this.browser.Size = new System.Drawing.Size(554, 424); this.browser.Size = new System.Drawing.Size(557, 424);
this.browser.TabIndex = 1; this.browser.TabIndex = 1;
this.browser.TabStop = false; this.browser.TabStop = false;
this.browser.SelectedItemDoubleClicked += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemDoubleClickDelegate(this.browser_SelectedItemDoubleClicked); this.browser.SelectedItemDoubleClicked += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemDoubleClickDelegate(this.browser_SelectedItemDoubleClicked);
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged); this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
// //
// splitContainer
//
this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer.Location = new System.Drawing.Point(12, 12);
this.splitContainer.Name = "splitContainer";
//
// splitContainer.Panel1
//
this.splitContainer.Panel1.Controls.Add(this.browser);
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.tvTextureSets);
this.splitContainer.Size = new System.Drawing.Size(760, 424);
this.splitContainer.SplitterDistance = 557;
this.splitContainer.TabIndex = 5;
//
// TextureBrowserForm // TextureBrowserForm
// //
this.AcceptButton = this.apply; this.AcceptButton = this.apply;
@ -115,10 +141,9 @@ namespace CodeImp.DoomBuilder.Windows
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel; this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(784, 442); this.ClientSize = new System.Drawing.Size(784, 442);
this.Controls.Add(this.tvTextureSets);
this.Controls.Add(this.cancel); this.Controls.Add(this.cancel);
this.Controls.Add(this.apply); this.Controls.Add(this.apply);
this.Controls.Add(this.browser); this.Controls.Add(this.splitContainer);
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "TextureBrowserForm"; this.Name = "TextureBrowserForm";
this.Opacity = 1; this.Opacity = 1;
@ -133,6 +158,9 @@ namespace CodeImp.DoomBuilder.Windows
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.TextureBrowserForm_HelpRequested); this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.TextureBrowserForm_HelpRequested);
this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd); this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd);
this.splitContainer.Panel1.ResumeLayout(false);
this.splitContainer.Panel2.ResumeLayout(false);
this.splitContainer.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -143,6 +171,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Button cancel; private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply; private System.Windows.Forms.Button apply;
private System.Windows.Forms.ImageList smallimages; private System.Windows.Forms.ImageList smallimages;
private System.Windows.Forms.TreeView tvTextureSets; private CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview tvTextureSets;
private System.Windows.Forms.SplitContainer splitContainer;
} }
} }

View file

@ -169,7 +169,9 @@ namespace CodeImp.DoomBuilder.Windows
if (tvTextureSets.Nodes.Count > 0) if (tvTextureSets.Nodes.Count > 0)
{ {
if (selectedset == null) selectedset = tvTextureSets.Nodes[tvTextureSets.Nodes.Count - 1]; if (selectedset == null) selectedset = tvTextureSets.Nodes[tvTextureSets.Nodes.Count - 1];
tvTextureSets.SelectedNode = selectedset; tvTextureSets.SelectedNodes.Clear();
tvTextureSets.SelectedNodes.Add(selectedset);
selectedset.EnsureVisible();
} }
tvTextureSets.EndUpdate();//mxd tvTextureSets.EndUpdate();//mxd
@ -184,6 +186,12 @@ namespace CodeImp.DoomBuilder.Windows
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width), this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height)); General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal); this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
//mxd. Set SplitterDistance
int splitterdistance = splitContainer.Width - General.Settings.ReadSetting("browserwindow.splitterdistance", 203);
if(splitterdistance < splitContainer.Panel1MinSize || splitterdistance > splitContainer.Width - splitContainer.Panel2MinSize)
splitterdistance = splitContainer.Width - splitContainer.Width / 4;
splitContainer.SplitterDistance = splitterdistance;
//mxd //mxd
if (this.WindowState == FormWindowState.Normal) if (this.WindowState == FormWindowState.Normal)
@ -444,10 +452,11 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.WriteSetting("browserwindow.sizewidth", lastsize.Width); General.Settings.WriteSetting("browserwindow.sizewidth", lastsize.Width);
General.Settings.WriteSetting("browserwindow.sizeheight", lastsize.Height); General.Settings.WriteSetting("browserwindow.sizeheight", lastsize.Height);
General.Settings.WriteSetting("browserwindow.windowstate", windowstate); General.Settings.WriteSetting("browserwindow.windowstate", windowstate);
General.Settings.WriteSetting("browserwindow.splitterdistance", splitContainer.Width - splitContainer.SplitterDistance); //mxd
//mxd. Save last selected texture set //mxd. Save last selected texture set, if it's not "All" (it will be selected anyway if search for initial texture set fails)
if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNode != null) if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNodes.Count > 0 && !(tvTextureSets.SelectedNodes[0].Tag is AllTextureSet))
General.Settings.WriteSetting("browserwindow.textureset", tvTextureSets.SelectedNode.Name); General.Settings.WriteSetting("browserwindow.textureset", tvTextureSets.SelectedNodes[0].Name);
//mxd. Save ImageBrowserControl settings //mxd. Save ImageBrowserControl settings
General.Settings.WriteSetting("browserwindow.showtexturesizes", ImageBrowserControl.ShowTextureSizes); General.Settings.WriteSetting("browserwindow.showtexturesizes", ImageBrowserControl.ShowTextureSizes);
@ -541,9 +550,9 @@ namespace CodeImp.DoomBuilder.Windows
//mxd //mxd
private void tvTextureSets_KeyUp(object sender, KeyEventArgs e) private void tvTextureSets_KeyUp(object sender, KeyEventArgs e)
{ {
if(tvTextureSets.SelectedNode != selectedset) if(tvTextureSets.SelectedNodes.Count > 0 && tvTextureSets.SelectedNodes[0] != selectedset)
{ {
selectedset = tvTextureSets.SelectedNode; selectedset = tvTextureSets.SelectedNodes[0];
FillImagesList(); FillImagesList();
} }
} }