mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use lambda function instead of private method
This commit is contained in:
parent
6aeff55cc8
commit
bdf33f1086
2 changed files with 7 additions and 23 deletions
|
|
@ -20,9 +20,12 @@ Label::Label(
|
|||
controller->signal_pressed().connect(
|
||||
[this](int n, double x, double y)
|
||||
{
|
||||
on_click(
|
||||
n, x, y
|
||||
);
|
||||
if (n == 2) // double click
|
||||
{
|
||||
activate_action(
|
||||
"win.tab_close"
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -31,17 +34,4 @@ Label::Label(
|
|||
);
|
||||
}
|
||||
|
||||
Label::~Label() = default;
|
||||
|
||||
void Label::on_click(
|
||||
int n,
|
||||
double x,
|
||||
double y
|
||||
) {
|
||||
if (n == 2) // double click
|
||||
{
|
||||
activate_action(
|
||||
"win.tab_close"
|
||||
);
|
||||
}
|
||||
}
|
||||
Label::~Label() = default;
|
||||
Loading…
Add table
Add a link
Reference in a new issue