1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

fixed issue in Demo where a custom component in a TableListBoxModel was preventing rows from being selected.

This commit is contained in:
Timur Doumler 2015-04-20 18:04:02 +01:00
parent 1c382e83fc
commit dc05cd506d

View file

@ -892,10 +892,19 @@ private:
EditableTextCustomComponent (TableDemoComponent& owner_)
: owner (owner_)
{
// double click to edit the label text; single click handled below
setEditable (false, true, false);
setColour (textColourId, Colours::black);
}
void mouseDown (const MouseEvent& event) override
{
// single click on the label should simply select the row
owner.table.selectRowsBasedOnModifierKeys (row, event.mods, false);
Label::mouseDown (event);
}
void textWasEdited() override
{
owner.setText (columnId, row, getText());