kopia lustrzana https://github.com/njcrawford/EmbroideryReader
Properly load and save background grid color when background grid is disabled
rodzic
2d78fbc5b5
commit
9c44d3ecf6
|
@ -56,7 +56,7 @@ namespace embroideryReader
|
||||||
args = Environment.GetCommandLineArgs();
|
args = Environment.GetCommandLineArgs();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkSettings()
|
private void loadSettings(bool reload)
|
||||||
{
|
{
|
||||||
if (settings.backgroundColorEnabled)
|
if (settings.backgroundColorEnabled)
|
||||||
{
|
{
|
||||||
|
@ -66,16 +66,19 @@ namespace embroideryReader
|
||||||
{
|
{
|
||||||
panel2.BackColor = Color.FromKnownColor(KnownColor.Control);
|
panel2.BackColor = Color.FromKnownColor(KnownColor.Control);
|
||||||
}
|
}
|
||||||
if (settings.windowMaximized)
|
if (!reload)
|
||||||
{
|
{
|
||||||
// Check maximized first
|
if (settings.windowMaximized)
|
||||||
this.WindowState = FormWindowState.Maximized;
|
{
|
||||||
}
|
// Check maximized first
|
||||||
else
|
this.WindowState = FormWindowState.Maximized;
|
||||||
{
|
}
|
||||||
// Not maximized, restore last saved window size
|
else
|
||||||
this.Width = settings.windowWidth;
|
{
|
||||||
this.Height = settings.windowHeight;
|
// Not maximized, restore last saved window size
|
||||||
|
this.Width = settings.windowWidth;
|
||||||
|
this.Height = settings.windowHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setDesignScaleSetting(1.0f, settings.AutoScaleDesign, false);
|
setDesignScaleSetting(1.0f, settings.AutoScaleDesign, false);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +89,7 @@ namespace embroideryReader
|
||||||
this.Text = APP_TITLE;
|
this.Text = APP_TITLE;
|
||||||
|
|
||||||
// Load and check settings
|
// Load and check settings
|
||||||
checkSettings();
|
loadSettings(false);
|
||||||
|
|
||||||
// Load translation
|
// Load translation
|
||||||
loadTranslatedStrings(settings.translation);
|
loadTranslatedStrings(settings.translation);
|
||||||
|
@ -510,7 +513,8 @@ namespace embroideryReader
|
||||||
if (tempForm.ShowDialog() == DialogResult.OK)
|
if (tempForm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
settings = tempForm.settingsToModify;
|
settings = tempForm.settingsToModify;
|
||||||
checkSettings();
|
loadSettings(true);
|
||||||
|
updateDesignImage();
|
||||||
}
|
}
|
||||||
loadTranslatedStrings(settings.translation);
|
loadTranslatedStrings(settings.translation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,10 +70,7 @@ namespace embroideryReader
|
||||||
chkDrawGrid.Checked = settings.transparencyGridEnabled;
|
chkDrawGrid.Checked = settings.transparencyGridEnabled;
|
||||||
gridSize = settings.transparencyGridSize;
|
gridSize = settings.transparencyGridSize;
|
||||||
txtGridSize.Text = gridSize.ToString();
|
txtGridSize.Text = gridSize.ToString();
|
||||||
if(chkDrawGrid.Checked)
|
transparencyGridColor = settings.transparencyGridColor;
|
||||||
{
|
|
||||||
transparencyGridColor = settings.transparencyGridColor;
|
|
||||||
}
|
|
||||||
updateGridColorControls();
|
updateGridColorControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue