mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 15:05:57 +08:00
Merge pull request #1505 from LipuFei/bugfix_CURA-3471-crash-on-drag-stl
CURA-3471 Crash on drag and drop STL
This commit is contained in:
commit
3c8a6a6691
@ -823,7 +823,7 @@ class ContainerManager(QObject):
|
||||
#
|
||||
# \param QVariant<QUrl>, essentially a list with QUrl objects.
|
||||
# \return Dict with keys status, text
|
||||
@pyqtSlot(QVariant, result="QVariantMap")
|
||||
@pyqtSlot("QVariantList", result="QVariantMap")
|
||||
def importProfiles(self, file_urls):
|
||||
status = "ok"
|
||||
results = {"ok": [], "error": []}
|
||||
|
@ -266,11 +266,11 @@ UM.MainWindow
|
||||
anchors.fill: parent;
|
||||
onDropped:
|
||||
{
|
||||
if(drop.urls.length > 0)
|
||||
if (drop.urls.length > 0)
|
||||
{
|
||||
// Import models
|
||||
var imported_model = -1;
|
||||
for(var i in drop.urls)
|
||||
for (var i in drop.urls)
|
||||
{
|
||||
// There is no endsWith in this version of JS...
|
||||
if ((drop.urls[i].length <= 12) || (drop.urls[i].substring(drop.urls[i].length-12) !== ".curaprofile")) {
|
||||
@ -287,7 +287,7 @@ UM.MainWindow
|
||||
var import_result = Cura.ContainerManager.importProfiles(drop.urls);
|
||||
if (import_result.message !== "") {
|
||||
messageDialog.text = import_result.message
|
||||
if(import_result.status == "ok")
|
||||
if (import_result.status == "ok")
|
||||
{
|
||||
messageDialog.icon = StandardIcon.Information
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user