mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
HackStudio: Use is<GitWidget>() instead of comparing class_name()
This commit is contained in:
parent
60064e2049
commit
563d3bdcc9
1 changed files with 4 additions and 5 deletions
|
@ -153,11 +153,10 @@ void HackStudioWidget::update_actions()
|
||||||
void HackStudioWidget::on_action_tab_change()
|
void HackStudioWidget::on_action_tab_change()
|
||||||
{
|
{
|
||||||
update_actions();
|
update_actions();
|
||||||
auto active_widget = m_action_tab_widget->active_widget();
|
if (auto* active_widget = m_action_tab_widget->active_widget()) {
|
||||||
if (!active_widget)
|
if (is<GitWidget>(*active_widget))
|
||||||
return;
|
static_cast<GitWidget&>(*active_widget).refresh();
|
||||||
if (StringView { "GitWidget" } == active_widget->class_name())
|
}
|
||||||
reinterpret_cast<GitWidget*>(active_widget)->refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HackStudioWidget::open_project(const String& root_path)
|
void HackStudioWidget::open_project(const String& root_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue