Stubbed out load_file, some work on add to call load_file().

Added some comments for canvas2D.
This commit is contained in:
Joseph Lenox 2018-05-01 22:51:07 -05:00
parent 3b17844fba
commit ff1fa38b31
2 changed files with 26 additions and 2 deletions

View File

@ -109,8 +109,27 @@ Plater::Plater(wxWindow* parent, const wxString& title, std::shared_ptr<Settings
}
void Plater::add() {
Log::info(LogChannel, L"Called Add function");
auto& start_object_id = this->object_identifier;
const auto& input_files{open_model(this, *(this->settings), wxTheApp->GetTopWindow())};
for (const auto& f : input_files) {
Log::info(LogChannel, (wxString(L"Calling Load File for ") + f).ToStdWstring());
this->load_file(f);
}
// abort if no objects actually added.
if (start_object_id == this->object_identifier) return;
// save the added objects
// get newly added objects count
}
std::vector<int> Plater::load_file(const wxString& file) {
return std::vector<int>();
}
}} // Namespace Slic3r::GUI

View File

@ -44,14 +44,19 @@ private:
bool processed {false};
std::vector<PlaterObject> objects {};
std::vector<PlaterObject> objects {}; //< Main object vector.
size_t object_identifier {0U}; //< Counter for adding objects to Slic3r
std::stack<UndoOperation> undo {};
std::stack<UndoOperation> redo {};
wxNotebook* preview_notebook {new wxNotebook(this, -1, wxDefaultPosition, wxSize(335,335), wxNB_BOTTOM)};
Plate2D* canvas2D {};
Plate2D* canvas2D {}; //< 2D plater canvas
/// Handles the actual load of the file from the dialog handoff.
std::vector<int> load_file(const wxString& file);
const std::string LogChannel {"GUI_Plater"}; //< Which log these messages should go to.