New layout:

1. PreferencesDialog: When "Cancel" is selected, don't close the PreferencesDialog, just revert layout mode selection
2. For the tooltip of "Switch to Settings" added information about shortcuts
3. Shortcuts for the switching between tabs work from Settings Dialog now
4. Fixed the collapse button show after preference's change
This commit is contained in:
YuSanka 2020-05-05 17:23:58 +02:00
parent 43be7a51aa
commit 181203c2c7
7 changed files with 69 additions and 24 deletions

View file

@ -1640,6 +1640,7 @@ struct Plater::priv
void reset_all_gizmos();
void update_ui_from_settings();
void update_main_toolbar_tooltips();
std::shared_ptr<ProgressStatusBar> statusbar();
std::string get_config(const std::string &key) const;
BoundingBoxf bed_shape_bb() const;
@ -2041,7 +2042,11 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
// collapse sidebar according to saved value
sidebar->collapse(wxGetApp().app_config->get("collapsed_sidebar") == "1");
bool is_collapsed = wxGetApp().app_config->get("collapsed_sidebar") == "1";
sidebar->collapse(is_collapsed);
// Update an enable of the collapse_toolbar: if sidebar is collapsed, then collapse_toolbar should be visible
if (is_collapsed)
wxGetApp().app_config->set("show_collapse_button", "1");
}
Plater::priv::~priv()
@ -2116,6 +2121,13 @@ void Plater::priv::update_ui_from_settings()
preview->get_canvas3d()->update_ui_from_settings();
}
// Called after the print technology was changed.
// Update the tooltips for "Switch to Settings" button in maintoolbar
void Plater::priv::update_main_toolbar_tooltips()
{
view3D->get_canvas3d()->update_tooltip_for_settings_item_in_main_toolbar();
}
std::shared_ptr<ProgressStatusBar> Plater::priv::statusbar()
{
return main_frame->m_statusbar;
@ -5278,6 +5290,8 @@ void Plater::set_printer_technology(PrinterTechnology printer_technology)
if (wxGetApp().mainframe)
wxGetApp().mainframe->update_menubar();
p->update_main_toolbar_tooltips();
}
void Plater::changed_object(int obj_idx)