mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Remove unused RotoptimzeWindow imgui dialog.
It might be added in the future in a more polished form.
This commit is contained in:
		
							parent
							
								
									a131217ada
								
							
						
					
					
						commit
						2a98aa113c
					
				
					 2 changed files with 0 additions and 83 deletions
				
			
		|  | @ -200,62 +200,10 @@ void GLGizmoRotate::on_render_for_picking() const | |||
|     glsafe(::glPopMatrix()); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| GLGizmoRotate3D::RotoptimzeWindow::RotoptimzeWindow(ImGuiWrapper *   imgui, | ||||
|                                                     State &          state, | ||||
|                                                     const Alignment &alignment) | ||||
|     : m_imgui{imgui} | ||||
| { | ||||
|     imgui->begin(_L("Rotation"), ImGuiWindowFlags_NoMove | | ||||
|                                    ImGuiWindowFlags_AlwaysAutoResize | | ||||
|                                    ImGuiWindowFlags_NoCollapse); | ||||
| 
 | ||||
|     // adjust window position to avoid overlap the view toolbar
 | ||||
|     float win_h = ImGui::GetWindowHeight(); | ||||
|     float x = alignment.x, y = alignment.y; | ||||
|     y = std::min(y, alignment.bottom_limit - win_h); | ||||
|     ImGui::SetWindowPos(ImVec2(x, y), ImGuiCond_Always); | ||||
| 
 | ||||
|     static constexpr const char * button_txt = L("Optimize orientation"); | ||||
|     static constexpr const char * slider_txt = L("Accuracy"); | ||||
| 
 | ||||
|     float button_width = imgui->calc_text_size(_(button_txt)).x; | ||||
|     ImGui::PushItemWidth(100.); | ||||
|     //if (imgui->button(_(button_txt))) {
 | ||||
|     if (ImGui::ArrowButton(_(button_txt).c_str(), ImGuiDir_Down)){ | ||||
|         std::cout << "Blip" << std::endl; | ||||
|     } | ||||
| 
 | ||||
|     ImGui::SliderFloat(_(slider_txt).c_str(), &state.accuracy, 0.01f, 1.f, "%.1f"); | ||||
| 
 | ||||
|     static const std::vector<std::string> options = { | ||||
|         _L("Least supports").ToStdString(), | ||||
|         _L("Suface quality").ToStdString() | ||||
|     }; | ||||
| 
 | ||||
| //    if (imgui->combo(_L("Choose method"), options, state.method) ) {
 | ||||
| //        std::cout << "method: " << state.method << std::endl;
 | ||||
| //    }
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| GLGizmoRotate3D::RotoptimzeWindow::~RotoptimzeWindow() | ||||
| { | ||||
|     m_imgui->end(); | ||||
| } | ||||
| 
 | ||||
| void GLGizmoRotate3D::on_render_input_window(float x, float y, float bottom_limit) | ||||
| { | ||||
|     if (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA) | ||||
|         return; | ||||
| 
 | ||||
| // TODO:
 | ||||
| 
 | ||||
| //    m_rotoptimizewin_state.mobj = ?;
 | ||||
| //    RotoptimzeWindow popup{m_imgui, m_rotoptimizewin_state, {x, y, bottom_limit}};
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| void GLGizmoRotate::render_circle() const | ||||
|  |  | |||
|  | @ -136,37 +136,6 @@ protected: | |||
|     } | ||||
| 
 | ||||
|     void on_render_input_window(float x, float y, float bottom_limit) override; | ||||
| 
 | ||||
| private: | ||||
| 
 | ||||
|     class RotoptimzeWindow { | ||||
|         ImGuiWrapper *m_imgui = nullptr; | ||||
| 
 | ||||
|     public: | ||||
| 
 | ||||
|         struct State { | ||||
|             enum Metods { mMinSupportPoints, mLegacy }; | ||||
| 
 | ||||
|             float        accuracy = 1.f; | ||||
|             int          method   = mMinSupportPoints; | ||||
|             ModelObject *mobj     = nullptr; | ||||
|         }; | ||||
| 
 | ||||
|         struct Alignment { float x, y, bottom_limit; }; | ||||
| 
 | ||||
|         RotoptimzeWindow(ImGuiWrapper *   imgui, | ||||
|                          State &          state, | ||||
|                          const Alignment &bottom_limit); | ||||
| 
 | ||||
|         ~RotoptimzeWindow(); | ||||
| 
 | ||||
|         RotoptimzeWindow(const RotoptimzeWindow&) = delete; | ||||
|         RotoptimzeWindow(RotoptimzeWindow &&) = delete; | ||||
|         RotoptimzeWindow& operator=(const RotoptimzeWindow &) = delete; | ||||
|         RotoptimzeWindow& operator=(RotoptimzeWindow &&) = delete; | ||||
|     }; | ||||
| 
 | ||||
|     RotoptimzeWindow::State m_rotoptimizewin_state = {}; | ||||
| }; | ||||
| 
 | ||||
| } // namespace GUI
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tamasmeszaros
						tamasmeszaros