diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 4fbfd133..4611ef49 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 6d4c9d49..46a5e9f3 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 344b677e..c23cdf08 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs index dd8c2eb9..a0c7b3c7 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs @@ -312,6 +312,8 @@ namespace FirstPlugin LibraryGUI.Instance.LoadEditor(bfresEditor); } + bool ViewportToggled = bfresEditor.DisplayViewport; + if (SelectedSection is FTEX) { ImageEditorBase editorFtex = (ImageEditorBase)bfresEditor.GetActiveEditor(typeof(ImageEditorBase)); @@ -325,7 +327,7 @@ namespace FirstPlugin editorFtex.Text = Text; editorFtex.LoadProperties(((FTEX)SelectedSection).texture); editorFtex.LoadImage((FTEX)SelectedSection); - if (Runtime.DisplayViewport) + if (Runtime.DisplayViewport && ViewportToggled) editorFtex.SetEditorOrientation(true); if (((FTEX)SelectedSection).texture.UserData != null) @@ -364,7 +366,7 @@ namespace FirstPlugin } editor.Text = Text; - if (Runtime.DisplayViewport) + if (Runtime.DisplayViewport && ViewportToggled) editor.SetEditorOrientation(true); editor.LoadProperties(((TextureData)SelectedSection).Texture); diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 26093755..ae04dc90 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs index 200fe2ef..baf719f1 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs @@ -481,7 +481,6 @@ this.displayVerticalToolStripMenuItem.Name = "displayVerticalToolStripMenuItem"; this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(205, 22); this.displayVerticalToolStripMenuItem.Text = "Display Vertical"; - this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged); this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click); // // displayAlphaToolStripMenuItem diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs index 5f8a592a..4da598f8 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs @@ -182,8 +182,6 @@ namespace Switch_Toolbox.Library.Forms SetEditorOrientation(Runtime.ImageEditor.DisplayVertical); - if (!Runtime.ImageEditor.DisplayVertical) - DisplayHorizontal(); propertyGridToolStripMenuItem.Checked = Runtime.ImageEditor.ShowPropertiesPanel; @@ -213,6 +211,7 @@ namespace Switch_Toolbox.Library.Forms public void SetEditorOrientation(bool ToVertical) { displayVerticalToolStripMenuItem.Checked = ToVertical; + SetOrientation(); } private void UpdateBackgroundImage() @@ -792,12 +791,6 @@ namespace Switch_Toolbox.Library.Forms } - private void displayVerticalToolStripMenuItem_CheckedChanged(object sender, EventArgs e) - { - SetOrientation(); - SaveSettings(); - } - private void SetOrientation() { if (displayVerticalToolStripMenuItem.Checked) @@ -808,8 +801,6 @@ namespace Switch_Toolbox.Library.Forms { DisplayHorizontal(); } - - Runtime.ImageEditor.DisplayVertical = displayVerticalToolStripMenuItem.Checked; } private void displayVerticalToolStripMenuItem_Click(object sender, EventArgs e) @@ -822,6 +813,11 @@ namespace Switch_Toolbox.Library.Forms { displayVerticalToolStripMenuItem.Checked = true; } + + Runtime.ImageEditor.DisplayVertical = displayVerticalToolStripMenuItem.Checked; + + SetOrientation(); + SaveSettings(); } private void HidePropertyGrid(bool Hide)