Merge remote-tracking branch 'origin/2.3'

This commit is contained in:
Aldo Hoeben 2016-09-07 11:14:42 +02:00
commit 33d9f94f5c
4 changed files with 8 additions and 5 deletions

View file

@ -107,7 +107,6 @@ class PlatformPhysics:
continue # Other node is already moving, wait for next pass.
overlap = (0, 0) # Start loop with no overlap
move_vector = move_vector.set(x=overlap[0] * self._move_factor, z=overlap[1] * self._move_factor)
current_overlap_checks = 0
# Continue to check the overlap until we no longer find one.
while overlap and current_overlap_checks < self._max_overlap_checks:

View file

@ -254,6 +254,10 @@ class ContainerManager(QObject):
return True
return False
@pyqtSlot(str, result = str)
def makeUniqueName(self, original_name):
return self._container_registry.uniqueName(original_name)
## Get a list of string that can be used as name filters for a Qt File Dialog
#
# This will go through the list of available container types and generate a list of strings

View file

@ -69,7 +69,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = ExtruderManager.getInstance().extruderIds[stack_nr])[0]
else:
stack = UM.Application.getInstance().getGlobalContainerStack()
new_instance.setProperty("value", stack.getProperty(item, "value"))
new_instance.setProperty("value", stack.getRawProperty(item, "value"))
new_instance.resetState() # Ensure that the state is not seen as a user state.
settings.addInstance(new_instance)
visibility_changed = True

View file

@ -84,7 +84,7 @@ UM.ManagementPage
onClicked:
{
newNameDialog.object = base.currentItem != null ? base.currentItem.name : "";
newNameDialog.object = base.currentItem != null ? Cura.ContainerManager.makeUniqueName(base.currentItem.name) : "";
newNameDialog.open();
newNameDialog.selectText();
}
@ -100,7 +100,7 @@ UM.ManagementPage
onClicked:
{
newDuplicateNameDialog.object = base.currentItem.name;
newDuplicateNameDialog.object = Cura.ContainerManager.makeUniqueName(base.currentItem.name);
newDuplicateNameDialog.open();
newDuplicateNameDialog.selectText();
}
@ -144,7 +144,7 @@ UM.ManagementPage
signal createProfile()
onCreateProfile:
{
newNameDialog.object = base.currentItem != null ? base.currentItem.name : "";
newNameDialog.object = base.currentItem != null ? Cura.ContainerManager.makeUniqueName(base.currentItem.name) : "";
newNameDialog.open();
newNameDialog.selectText();
}