diff --git a/PrinterControls/PrinterConnections/PrinterChooser.cs b/PrinterControls/PrinterConnections/PrinterChooser.cs index 0ed8da88f..3076bd181 100644 --- a/PrinterControls/PrinterConnections/PrinterChooser.cs +++ b/PrinterControls/PrinterConnections/PrinterChooser.cs @@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl } else { - ManufacturerDropList.AddItem(manufacturer); + ManufacturerDropList.AddItem(manufacturer, folderName); if (selectedMake != null) { if (this.manufacturer == selectedMake) diff --git a/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs b/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs index 8b189bc27..b21842d94 100644 --- a/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs +++ b/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs @@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections private void ManufacturerDropList_SelectionChanged(object sender, EventArgs e) { - ActivePrinter.Make = ((DropDownList)sender).SelectedLabel; + ActivePrinter.Make = ((DropDownList)sender).SelectedValue; ActivePrinter.Model = null; ReconstructModelSelector(); SetElementState(); @@ -184,17 +184,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections //reconstruct model selector int currentIndex = contentRow.GetChildIndex(printerModelContainer); contentRow.RemoveChild(printerModelContainer); - List manufacturerNameMapping = OemSettings.Instance.ManufacturerNameMappings; - foreach(ManufacturerNameMapping mapping in manufacturerNameMapping) - { - - if (mapping.NameToDisplay == ActivePrinter.Make) - { - ActivePrinter.Make = mapping.NameOnDisk; - } - - } printerModelContainer = createPrinterModelContainer(ActivePrinter.Make); @@ -214,7 +204,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections SetElementState(); if (usingDefaultName) { - string printerInputName = String.Format("{0} {1}", this.ActivePrinter.Make, this.ActivePrinter.Model); + // Use ManufacturerDropList.SelectedLabel instead of ActivePrinter.Make to ensure the mapped Unicode values are picked up + string mappedMakeText = printerManufacturerSelector.ManufacturerDropList.SelectedLabel; + + string printerInputName = String.Format("{0} {1}", mappedMakeText, this.ActivePrinter.Model); string query = "SELECT Name FROM Printer WHERE Name LIKE @printerName;"; var names = Datastore.Instance.dbSQLite.Query(query, printerInputName + "%").Select(item => item.Name).ToList(); @@ -231,7 +224,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections do { printerModelCount++; - possiblePrinterName = String.Format("{0} ({1})", printerInputName, printerModelCount); + possiblePrinterName = String.Format("{0} ({1})", printerInputName, printerModelCount); } while (names.Contains(possiblePrinterName)); diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 9ef61224e..869d629c6 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 9ef61224e980ab1d8587f9ae8985360d97799ed5 +Subproject commit 869d629c63d72a7a6e8ad004a86ac11283b199dc