Browse Source

GTableView: Ignore right clicks for now.

Andreas Kling 6 years ago
parent
commit
09ecef6299
1 changed files with 3 additions and 3 deletions
  1. 3 3
      LibGUI/GTableView.cpp

+ 3 - 3
LibGUI/GTableView.cpp

@@ -92,8 +92,8 @@ void GTableView::mousedown_event(GMouseEvent& event)
         return;
         return;
     }
     }
 
 
-    auto adjusted_position = event.position().translated(0, m_vertical_scrollbar->value());
     if (event.button() == GMouseButton::Left) {
     if (event.button() == GMouseButton::Left) {
+        auto adjusted_position = event.position().translated(0, m_vertical_scrollbar->value());
         for (int i = 0; i < item_count(); ++i) {
         for (int i = 0; i < item_count(); ++i) {
             if (row_rect(i).contains(adjusted_position)) {
             if (row_rect(i).contains(adjusted_position)) {
                 m_model->set_selected_index({ i, 0 });
                 m_model->set_selected_index({ i, 0 });
@@ -101,9 +101,9 @@ void GTableView::mousedown_event(GMouseEvent& event)
                 return;
                 return;
             }
             }
         }
         }
+        m_model->set_selected_index({ });
+        update();
     }
     }
-    m_model->set_selected_index({ });
-    update();
 }
 }
 
 
 void GTableView::paint_event(GPaintEvent& event)
 void GTableView::paint_event(GPaintEvent& event)