Tech ENABLE_CTRL_M_ON_WINDOWS set as default
This commit is contained in:
parent
4146fd337a
commit
a3b60c09bc
8 changed files with 0 additions and 50 deletions
|
@ -156,12 +156,10 @@ void AppConfig::set_defaults()
|
|||
if (get("show_splash_screen").empty())
|
||||
set("show_splash_screen", "1");
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef _WIN32
|
||||
if (get("use_legacy_3DConnexion").empty())
|
||||
set("use_legacy_3DConnexion", "0");
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
// Remove legacy window positions/sizes
|
||||
erase("", "main_frame_maximized");
|
||||
|
|
|
@ -33,14 +33,6 @@
|
|||
#define ENABLE_SMOOTH_NORMALS 0
|
||||
|
||||
|
||||
//====================
|
||||
// 2.3.0.alpha3 techs
|
||||
//====================
|
||||
#define ENABLE_2_3_0_ALPHA3 1
|
||||
|
||||
#define ENABLE_CTRL_M_ON_WINDOWS (1 && ENABLE_2_3_0_ALPHA3)
|
||||
|
||||
|
||||
//====================
|
||||
// 2.3.0.alpha4 techs
|
||||
//====================
|
||||
|
|
|
@ -2509,8 +2509,6 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
#endif /* __APPLE__ */
|
||||
post_event(SimpleEvent(EVT_GLTOOLBAR_COPY));
|
||||
break;
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef __APPLE__
|
||||
case 'm':
|
||||
case 'M':
|
||||
|
@ -2529,18 +2527,6 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
#endif //_WIN32
|
||||
break;
|
||||
}
|
||||
#else
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
case WXK_CONTROL_M:
|
||||
{
|
||||
Mouse3DController& controller = wxGetApp().plater()->get_mouse3d_controller();
|
||||
controller.show_settings_dialog(!controller.is_settings_dialog_shown());
|
||||
m_dirty = true;
|
||||
break;
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
#ifdef __APPLE__
|
||||
case 'v':
|
||||
case 'V':
|
||||
|
|
|
@ -147,17 +147,11 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
{ "O", L("Zoom out") },
|
||||
{ "Tab", L("Switch between Editor/Preview") },
|
||||
{ "Shift+Tab", L("Collapse/Expand the sidebar") },
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef _WIN32
|
||||
{ ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog, if enabled") },
|
||||
#else
|
||||
{ ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog") },
|
||||
#endif // _WIN32
|
||||
#else
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
{ ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog") },
|
||||
#endif // __linux__
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
// Don't localize debugging texts.
|
||||
{ "P", "Toggle picking pass texture rendering on/off" },
|
||||
|
|
|
@ -100,7 +100,6 @@ void Mouse3DController::State::append_button(unsigned int id, size_t /* input_qu
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
static std::string format_device_string(int vid, int pid)
|
||||
{
|
||||
std::string ret;
|
||||
|
@ -257,7 +256,6 @@ static std::string detect_attached_device()
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
// Called by Win32 HID enumeration callback.
|
||||
void Mouse3DController::device_attached(const std::string &device)
|
||||
|
@ -274,7 +272,6 @@ void Mouse3DController::device_attached(const std::string &device)
|
|||
// Never mind, enumeration will be performed until connected.
|
||||
m_wakeup = true;
|
||||
m_stop_condition.notify_all();
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
m_device_str = format_device_string(vid, pid);
|
||||
if (auto it_params = m_params_by_device.find(m_device_str); it_params != m_params_by_device.end()) {
|
||||
tbb::mutex::scoped_lock lock(m_params_ui_mutex);
|
||||
|
@ -283,12 +280,10 @@ void Mouse3DController::device_attached(const std::string &device)
|
|||
else
|
||||
m_params_by_device[format_device_string(vid, pid)] = Params();
|
||||
m_connected = true;
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
void Mouse3DController::device_detached(const std::string& device)
|
||||
{
|
||||
int vid = 0;
|
||||
|
@ -302,7 +297,6 @@ void Mouse3DController::device_detached(const std::string& device)
|
|||
m_device_str = "";
|
||||
m_connected = false;
|
||||
}
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
// Filter out mouse scroll events produced by the 3DConnexion driver.
|
||||
bool Mouse3DController::State::process_mouse_wheel()
|
||||
|
@ -415,7 +409,6 @@ bool Mouse3DController::apply(Camera& camera)
|
|||
m_settings_dialog_closed_by_user = false;
|
||||
}
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef _WIN32
|
||||
{
|
||||
tbb::mutex::scoped_lock lock(m_params_ui_mutex);
|
||||
|
@ -425,7 +418,6 @@ bool Mouse3DController::apply(Camera& camera)
|
|||
}
|
||||
}
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
return m_state.apply(m_params, camera);
|
||||
}
|
||||
|
@ -661,7 +653,6 @@ bool Mouse3DController::handle_input(const DataPacketAxis& packet)
|
|||
// Initialize the application.
|
||||
void Mouse3DController::init()
|
||||
{
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef _WIN32
|
||||
m_device_str = detect_attached_device();
|
||||
if (!m_device_str.empty()) {
|
||||
|
@ -670,7 +661,6 @@ void Mouse3DController::init()
|
|||
m_params = m_params_ui = it_params->second;
|
||||
}
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
assert(! m_thread.joinable());
|
||||
if (! m_thread.joinable()) {
|
||||
|
@ -698,12 +688,10 @@ void Mouse3DController::shutdown()
|
|||
m_stop = false;
|
||||
}
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#ifdef _WIN32
|
||||
if (!m_device_str.empty())
|
||||
m_params_by_device[m_device_str] = m_params_ui;
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
}
|
||||
|
||||
// Main routine of the worker thread.
|
||||
|
@ -1064,9 +1052,7 @@ bool Mouse3DController::handle_raw_input_win32(const unsigned char *data, const
|
|||
DataPacketRaw packet;
|
||||
memcpy(packet.data(), data, packet_length);
|
||||
handle_packet(packet, packet_length, m_params, m_state);
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
m_connected = true;
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -195,9 +195,7 @@ public:
|
|||
|
||||
// Called by Win32 HID enumeration callback.
|
||||
void device_attached(const std::string &device);
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
void device_detached(const std::string& device);
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
// On Windows, the 3DConnexion driver sends out mouse wheel rotation events to an active application
|
||||
// if the application does not register at the driver. This is a workaround to ignore these superfluous
|
||||
|
|
|
@ -1931,11 +1931,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
this->q->Bind(EVT_HID_DEVICE_ATTACHED, [this](HIDDeviceAttachedEvent &evt) {
|
||||
mouse3d_controller.device_attached(evt.data);
|
||||
});
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
this->q->Bind(EVT_HID_DEVICE_DETACHED, [this](HIDDeviceAttachedEvent& evt) {
|
||||
mouse3d_controller.device_detached(evt.data);
|
||||
});
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
#endif /* _WIN32 */
|
||||
|
||||
notification_manager = new NotificationManager(this->q);
|
||||
|
|
|
@ -215,7 +215,6 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "show_splash_screen");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
|
||||
#if ENABLE_CTRL_M_ON_WINDOWS
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
def.label = L("Enable support for legacy 3DConnexion devices");
|
||||
def.type = coBool;
|
||||
|
@ -224,7 +223,6 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "use_legacy_3DConnexion");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
#endif // _WIN32 || __APPLE__
|
||||
#endif // ENABLE_CTRL_M_ON_WINDOWS
|
||||
|
||||
activate_options_tab(m_optgroup_general);
|
||||
|
||||
|
|
Loading…
Reference in a new issue