Commented opening menubar item until its properly implemented.

This commit is contained in:
David Kocik 2021-09-01 15:12:36 +02:00
parent 950c216239
commit 876e6fdddd
4 changed files with 9 additions and 8 deletions

View File

@ -194,11 +194,11 @@ documentation_link = https://help.prusa3d.com/en/article/insert-pause-or-custom-
disabled_tags = SLA
[hint:Configuration snapshots]
text = Configuration snapshots\nDid you know that roll back to a complete backup of all system and user profiles? You can view and move back and forth between snapshots using the Configuration - <a>Configuration snapshots menu.</a>
text = Configuration snapshots\nDid you know that roll back to a complete backup of all system and user profiles? You can view and move back and forth between snapshots using the Configuration - Configuration snapshots menu.
documentation_link = https://help.prusa3d.com/en/article/configuration-snapshots_1776
hypertext_type = menubar
hypertext_menubar_menu_id = 4
hypertext_menubar_item_id = 1
#hypertext_type = menubar
#hypertext_menubar_menu_id = 4
#hypertext_menubar_item_id = 1
[hint:Minimum wall thickness]
text = Minimum wall thickness\nDid you know that instead of the number of top and bottom layers, you can define the<a>Minimum shell thickness</a>in millimeters? This feature is especially useful when using the variable layer height function.

View File

@ -379,12 +379,12 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path)
wxGetApp().obj_list()->load_shape_object_from_gallery(); }
};
m_loaded_hints.emplace_back(hint_data);
} else if (dict["hypertext_type"] == "menubar") {
} /*else if (dict["hypertext_type"] == "menubar") {
int menu = std::atoi(dict["hypertext_menubar_menu_id"].c_str());
int item = std::atoi(dict["hypertext_menubar_item_id"].c_str());
HintData hint_data{ id_string, text1, weight, was_displayed, hypertext_text, follow_text, disabled_tags, enabled_tags, true, documentation_link, [menu, item]() { wxGetApp().mainframe->open_menubar_item(menu, item); } };
m_loaded_hints.emplace_back(hint_data);
}
}*/
} else {
// plain text without hypertext
HintData hint_data{ id_string, text1, weight, was_displayed, hypertext_text, follow_text, disabled_tags, enabled_tags, false, documentation_link };

View File

@ -1480,7 +1480,7 @@ void MainFrame::init_menubar_as_editor()
if (plater()->printer_technology() == ptSLA)
update_menubar();
}
/*
void MainFrame::open_menubar_item(int menu_index, int item_index)
{
if (m_menubar == nullptr)
@ -1502,6 +1502,7 @@ void MainFrame::open_menubar_item(int menu_index, int item_index)
}
wxPostEvent((wxEvtHandler*)menu, wxCommandEvent(wxEVT_MENU, item->GetId()));
}
*/
void MainFrame::init_menubar_as_gcodeviewer()
{
wxMenu* fileMenu = new wxMenu;

View File

@ -159,7 +159,7 @@ public:
void init_menubar_as_gcodeviewer();
void update_menubar();
// Open item in menu by menu and item index (visible order of items including separators)
void open_menubar_item(int menu_index, int item_index);
//void open_menubar_item(int menu_index, int item_index);
#ifdef _WIN32
void show_tabs_menu(bool show);
#endif