mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibGUI: Don't assert when right clicking on a vertical HeaderView
Just log a debug message instead. We still need to actually implement vertical header context menus, but for now let's at least not crash.
This commit is contained in:
parent
491e4a8a3b
commit
005afa4c6e
1 changed files with 5 additions and 2 deletions
|
@ -321,11 +321,14 @@ Menu& HeaderView::ensure_context_menu()
|
||||||
ASSERT(model());
|
ASSERT(model());
|
||||||
m_context_menu = Menu::construct();
|
m_context_menu = Menu::construct();
|
||||||
|
|
||||||
|
if (m_orientation == Gfx::Orientation::Vertical) {
|
||||||
|
dbgln("FIXME: Support context menus for vertical GUI::HeaderView");
|
||||||
|
return *m_context_menu;
|
||||||
|
}
|
||||||
|
|
||||||
int section_count = this->section_count();
|
int section_count = this->section_count();
|
||||||
for (int section = 0; section < section_count; ++section) {
|
for (int section = 0; section < section_count; ++section) {
|
||||||
auto& column_data = this->section_data(section);
|
auto& column_data = this->section_data(section);
|
||||||
// FIXME: Vertical support
|
|
||||||
ASSERT(m_orientation == Gfx::Orientation::Horizontal);
|
|
||||||
auto name = model()->column_name(section);
|
auto name = model()->column_name(section);
|
||||||
column_data.visibility_action = Action::create_checkable(name, [this, section](auto& action) {
|
column_data.visibility_action = Action::create_checkable(name, [this, section](auto& action) {
|
||||||
set_section_visible(section, action.is_checked());
|
set_section_visible(section, action.is_checked());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue