From 07d1d44d8c3cbf7eceaae194ae02ca44b2c1c446 Mon Sep 17 00:00:00 2001
From: Enrico Turri <enricoturri@seznam.cz>
Date: Mon, 15 Apr 2019 09:22:11 +0200
Subject: [PATCH] Switch to Advanced mode if object or volumes imported from
 3mf and amf files contain advanced config data

---
 src/slic3r/GUI/Plater.cpp | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index cb14d9fe5..a19791872 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -1633,6 +1633,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
                         break;
                     }
 
+                    // is there any advanced config data ?
+                    auto opt_keys = model_object->config.keys();
+                    if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
+                    {
+                        advanced = true;
+                        break;
+                    }
+
                     // is there any modifier ?
                     for (const ModelVolume* model_volume : model_object->volumes)
                     {
@@ -1641,6 +1649,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
                             advanced = true;
                             break;
                         }
+
+                        // is there any advanced config data ?
+                        opt_keys = model_volume->config.keys();
+                        if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
+                        {
+                            advanced = true;
+                            break;
+                        }
                     }
 
                     if (advanced)