Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CuraApplication.py add startReloadAll signal when reloadAll is called #19608

Open
wants to merge 4 commits into
base: 5.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,9 @@ def arrange(self, nodes: List[SceneNode], fixed_nodes: List[SceneNode], *, grid
job = ArrangeObjectsJob(nodes, fixed_nodes, min_offset = max(min_offset, 8), grid_arrange = grid_arrangement)
job.start()

startReloadAll = pyqtSignal()
"""Signal when reloading all mesh data"""

@pyqtSlot()
def reloadAll(self) -> None:
"""Reload all mesh data on the screen from file."""
Expand Down Expand Up @@ -1628,6 +1631,8 @@ def reloadAll(self) -> None:
if not nodes:
return

self.startReloadAll.emit()

objects_in_filename: Dict[str, List[CuraSceneNode]] = {}
for node in nodes:
mesh_data = node.getMeshData()
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def getValue(self, line: str, key: str, default = None) -> Any:
if not key in line or (';' in line and line.find(key) > line.find(';')):
return default
sub_part = line[line.find(key) + 1:]
m = re.search('^-?[0-9]+\.?[0-9]*', sub_part)
m = re.search(r'^-?[0-9]+\.?[0-9]*', sub_part)
if m is None:
return default
try:
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def execute(self, data: List[str]) -> List[str]:
nbr_negative_layers += 1

#Track the latest printing temperature in order to resume at the correct temperature.
if re.match("T(\d*)", line):
if re.match(r"T(\d*)", line):
current_t = self.getValue(line, "T")
m = self.getValue(line, "M")
if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None:
Expand Down
2 changes: 1 addition & 1 deletion plugins/UM3NetworkPrinting/src/ExportFileJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, file_handler: Optional[FileHandler], nodes: List[SceneNode],

# Determine the filename.
job_name = CuraApplication.getInstance().getPrintInformation().jobName
job_name = re.sub("[^\w\-. ()]", "-", job_name)
job_name = re.sub(r"[^\w\-. ()]", "-", job_name)
extension = self._mesh_format_handler.preferred_format.get("extension", "")
self.setFileName("{}.{}".format(job_name, extension))

Expand Down
2 changes: 1 addition & 1 deletion resources/qml/ActionPanel/OutputProcessWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Cura 1.0 as Cura


// This element contains all the elements the user needs to visualize the data
// that is gather after the slicing process, such as printint time, material usage, ...
// that is gather after the slicing process, such as printing time, material usage, ...
// There are also two buttons: one to previsualize the output layers, and the other to
// select what to do with it (such as print over network, save to file, ...)
Column
Expand Down
4 changes: 2 additions & 2 deletions resources/qml/Menus/RecentFilesMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher.

import QtQuick 2.2
import QtQuick.Controls 2.1
import QtQuick.Controls 2.15

import UM 1.3 as UM
import Cura 1.0 as Cura
Expand Down Expand Up @@ -30,6 +30,6 @@ Cura.Menu
onTriggered: CuraApplication.readLocalFile(modelData)
}
onObjectAdded: (index, object) => menu.insertItem(index, object)
onObjectRemoved: (object) => menu.removeItem(object)
onObjectRemoved: (index, object) => menu.removeItem(object)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ RecommendedSettingSection
settingName: "support_structure"
propertyRemoveUnusedValue: false
updateAllExtruders: false
defaultExtruderIndex: supportExtruderProvider.properties.value
defaultExtruderIndex: supportExtruderProvider.properties.value != undefined ?
supportExtruderProvider.properties.value :
Cura.ExtruderManager.activeExtruderIndex
}
},
RecommendedSettingItem
Expand Down Expand Up @@ -92,7 +94,9 @@ RecommendedSettingSection
width: parent.width
settingName: "support_type"
updateAllExtruders: true
defaultExtruderIndex: supportExtruderProvider.properties.value
defaultExtruderIndex: supportExtruderProvider.properties.value != undefined ?
supportExtruderProvider.properties.value :
Cura.ExtruderManager.activeExtruderIndex
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/extract_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
args.version = args.version[:-2]

start_token = f"[{args.version}]"
pattern_stop_log = "\[\d+(\.\d+){1,2}\]"
pattern_stop_log = r"\[\d+(\.\d+){1,2}\]"
log_line = False
first_chapter = True

Expand Down
Loading