mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-02 20:04:32 +00:00
Fixed a bug where the user could accidentally change the selected tab in the main form
This commit is contained in:
1
PCK-Studio/MainForm.Designer.cs
generated
1
PCK-Studio/MainForm.Designer.cs
generated
@@ -705,6 +705,7 @@
|
||||
this.tabControl.TabStop = false;
|
||||
this.tabControl.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.tabControl.UseSelectable = true;
|
||||
this.tabControl.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabControl_Selecting);
|
||||
//
|
||||
// openTab
|
||||
//
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace PckStudio
|
||||
bool needsUpdate = false;
|
||||
bool saved = true;
|
||||
bool isTemplateFile = false;
|
||||
bool isSelectingTab = false;
|
||||
|
||||
readonly Dictionary<PCKFile.FileData.FileType, Action<PCKFile.FileData>> pckFileTypeHandler;
|
||||
|
||||
@@ -181,7 +182,9 @@ namespace PckStudio
|
||||
advancedMetaAddingToolStripMenuItem.Enabled = true;
|
||||
convertToBedrockToolStripMenuItem.Enabled = true;
|
||||
BuildMainTreeView();
|
||||
isSelectingTab = true;
|
||||
tabControl.SelectTab(1);
|
||||
isSelectingTab = false;
|
||||
if (TryGetLocFile(out LOCFile locfile) &&
|
||||
locfile.HasLocEntry("IDS_DISPLAY_NAME") &&
|
||||
locfile.Languages.Contains("en-EN"))
|
||||
@@ -190,7 +193,9 @@ namespace PckStudio
|
||||
|
||||
private void CloseEditorTab()
|
||||
{
|
||||
isSelectingTab = true;
|
||||
tabControl.SelectTab(0);
|
||||
isSelectingTab = false;
|
||||
currentPCK = null;
|
||||
saved = true;
|
||||
isTemplateFile = false;
|
||||
@@ -520,7 +525,7 @@ namespace PckStudio
|
||||
PCKFile.FileData InfoFile;
|
||||
if (!currentPCK.TryGetFile("0", PCKFile.FileData.FileType.InfoFile, out InfoFile))
|
||||
{
|
||||
switch(MessageBox.Show(this, "Info file, \"0\" was not detected. Would you like to save as a Skins.pck archive?", "Save as Skins archive?", MessageBoxButtons.YesNoCancel))
|
||||
switch(MessageBox.Show(this, "The info file, \"0\", was not detected. Would you like to save as a Skins.pck archive?", "Save as Skins archive?", MessageBoxButtons.YesNoCancel))
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
isSkinsPCK = true;
|
||||
@@ -2964,5 +2969,10 @@ namespace PckStudio
|
||||
currentPCK.Files.Add(NewColorFile);
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
private void tabControl_Selecting(object sender, TabControlCancelEventArgs e)
|
||||
{
|
||||
if (!isSelectingTab) e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29294,7 +29294,7 @@
|
||||
<data name="pckOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoCAYAAABNo9TkAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAA5JlJREFUeF7sfQeYFFX2Pf/9re6uuusaEFHXiJIUEAQkhyGnIecsMIDDkEGCIlHJ
|
||||
vAAADrwBlbxySQAA5JlJREFUeF7sfQeYFFX2Pf/9re6uuusaEFHXiJIUEAQkhyGnIecsMIDDkEGCIlHJ
|
||||
AiKIRAExK6hEJaOgKDkniQYUMGDcZf7nvKrXU9NTPdPdMyDgOd93prqrX913333v1dxTMZMgCIIgCIIg
|
||||
CIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIg
|
||||
CIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCIIg
|
||||
|
||||
Reference in New Issue
Block a user