Fixed conflicts after merge with master

This commit is contained in:
enricoturri1966 2020-03-20 10:55:37 +01:00
commit 5b24a0fb91
40 changed files with 1319 additions and 1171 deletions

View file

@ -3,6 +3,9 @@
#include <stddef.h>
#include <memory>
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#include <chrono>
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#include "3DScene.hpp"
#include "GLToolbar.hpp"
@ -389,6 +392,30 @@ private:
void render(const std::vector<const ModelInstance*>& sorted_instances) const;
};
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
class Tooltip
{
std::string m_text;
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
std::chrono::steady_clock::time_point m_start_time;
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
// Indicator that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
bool m_in_imgui = false;
public:
bool is_empty() const { return m_text.empty(); }
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
void set_text(const std::string& text);
void render(const Vec2d& mouse_position, GLCanvas3D& canvas) const;
#else
void set_text(const std::string& text) { m_text = text; }
void render(const Vec2d& mouse_position) const;
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
// Indicates that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
void set_in_imgui(bool b) { m_in_imgui = b; }
};
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
#if ENABLE_SLOPE_RENDERING
class Slope
{
@ -485,6 +512,9 @@ private:
int m_selected_extruder;
Labels m_labels;
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
mutable Tooltip m_tooltip;
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
#if ENABLE_SLOPE_RENDERING
Slope m_slope;
#endif // ENABLE_SLOPE_RENDERING