mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 20:52:04 +08:00
Stubbed out load_file, some work on add to call load_file().
Added some comments for canvas2D.
This commit is contained in:
parent
3b17844fba
commit
ff1fa38b31
@ -109,8 +109,27 @@ Plater::Plater(wxWindow* parent, const wxString& title, std::shared_ptr<Settings
|
|||||||
}
|
}
|
||||||
void Plater::add() {
|
void Plater::add() {
|
||||||
Log::info(LogChannel, L"Called Add function");
|
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
|
}} // Namespace Slic3r::GUI
|
||||||
|
|
||||||
|
@ -44,14 +44,19 @@ private:
|
|||||||
|
|
||||||
bool processed {false};
|
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> undo {};
|
||||||
std::stack<UndoOperation> redo {};
|
std::stack<UndoOperation> redo {};
|
||||||
|
|
||||||
wxNotebook* preview_notebook {new wxNotebook(this, -1, wxDefaultPosition, wxSize(335,335), wxNB_BOTTOM)};
|
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.
|
const std::string LogChannel {"GUI_Plater"}; //< Which log these messages should go to.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user