More work on design tab rename
This commit is contained in:
parent
1af9da751b
commit
9b3a36f0bf
5 changed files with 47 additions and 47 deletions
|
|
@ -931,25 +931,8 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
return;
|
||||
}
|
||||
|
||||
DialogWindow.Show(
|
||||
new InputBoxPage(
|
||||
"Rename Item".Localize(),
|
||||
"Name".Localize(),
|
||||
selectedItem.Model.Name,
|
||||
"Enter New Name Here".Localize(),
|
||||
"Rename".Localize(),
|
||||
(newName) =>
|
||||
{
|
||||
var model = libraryView.SelectedItems.FirstOrDefault()?.Model;
|
||||
if (model != null)
|
||||
{
|
||||
if (libraryView.ActiveContainer is ILibraryWritableContainer container)
|
||||
{
|
||||
container.Rename(model, newName);
|
||||
libraryView.SelectedItems.Clear();
|
||||
}
|
||||
}
|
||||
}));
|
||||
libraryContext.ActiveContainer.Rename(selectedItem.Model);
|
||||
libraryView.SelectedItems.Clear();
|
||||
}
|
||||
},
|
||||
IsEnabled = (selectedListItems, listView) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue