mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
bugfix in ImageBrowser
This commit is contained in:
parent
be95c10e99
commit
432d6362f2
2 changed files with 21 additions and 9 deletions
4
Source/Interface/ImageBrowser.Designer.cs
generated
4
Source/Interface/ImageBrowser.Designer.cs
generated
|
@ -17,6 +17,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
{
|
||||
components.Dispose();
|
||||
}
|
||||
if(graphics != null) graphics.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
|
@ -32,7 +33,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.rendertarget = new CodeImp.DoomBuilder.Interface.RenderTargetControl();
|
||||
this.splitter.Panel1.SuspendLayout();
|
||||
this.splitter.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rendertarget)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitter
|
||||
|
@ -61,7 +61,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.rendertarget.Name = "rendertarget";
|
||||
this.rendertarget.Size = new System.Drawing.Size(518, 310);
|
||||
this.rendertarget.TabIndex = 3;
|
||||
this.rendertarget.TabStop = false;
|
||||
//
|
||||
// ImageBrowser
|
||||
//
|
||||
|
@ -74,7 +73,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.Size = new System.Drawing.Size(518, 346);
|
||||
this.splitter.Panel1.ResumeLayout(false);
|
||||
this.splitter.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.rendertarget)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -63,15 +63,21 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Constructor
|
||||
public ImageBrowser()
|
||||
{
|
||||
// Make graphics device
|
||||
graphics = new D3DDevice(rendertarget);
|
||||
graphics.Initialize();
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
// Make items list
|
||||
items = new List<ImageBrowserItem>();
|
||||
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
rendertarget.SetBounds(0, 0, 0, 10000, BoundsSpecified.Height);
|
||||
rendertarget.ClientSize = new Size(0, 10000);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
~ImageBrowser()
|
||||
{
|
||||
// Clean up
|
||||
if(graphics != null) graphics.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -92,6 +98,14 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
|
||||
#region ================== Rendering
|
||||
|
||||
// Initialize
|
||||
public void InitializeGraphics()
|
||||
{
|
||||
// Make graphics device
|
||||
graphics = new D3DDevice(rendertarget);
|
||||
graphics.Initialize();
|
||||
}
|
||||
|
||||
// This redraws the list
|
||||
public void Redraw()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue