QTfrontend/ui/widget/keybinder.cpp
changeset 12698 f2690a0ccf19
parent 12236 a0ed4caa6d35
child 12897 fc47fc4af6bd
equal deleted inserted replaced
12697:c71e330d5094 12698:f2690a0ccf19
   240 // When a row in a key bind table is clicked, this shows the popup
   240 // When a row in a key bind table is clicked, this shows the popup
   241 void KeyBinder::bindCellClicked(QTableWidgetItem * item)
   241 void KeyBinder::bindCellClicked(QTableWidgetItem * item)
   242 {
   242 {
   243     QComboBox * box = bindCellComboBoxMappings->value(item);
   243     QComboBox * box = bindCellComboBoxMappings->value(item);
   244     QTableWidget * table = item->tableWidget();
   244     QTableWidget * table = item->tableWidget();
   245     QFrame * frame = box->findChild<QFrame*>();
   245 
   246 
   246     box->move(
       
   247         table->horizontalHeader()->sectionSize(0),
       
   248         (table->verticalHeader()->defaultSectionSize() * (item->row() + 1)) - (box->height()) + 1
       
   249     );
   247     box->showPopup();
   250     box->showPopup();
   248     frame->move(
       
   249         frame->x() + table->horizontalHeader()->sectionSize(0),
       
   250         frame->y() + (table->verticalHeader()->defaultSectionSize() * item->row())
       
   251     );
       
   252 }
   251 }
   253 
   252 
   254 // When a new row in a bind table is *selected*, this clears selection in any other table
   253 // When a new row in a bind table is *selected*, this clears selection in any other table
   255 void KeyBinder::bindSelectionChanged()
   254 void KeyBinder::bindSelectionChanged()
   256 {
   255 {