mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
HackStudio: Remove old form editing logic
In the past Hack Studio had the ability to design GUI widgets via `.frm` files. We now use the GML playground for this purpose, and the old code can be removed. `.frm` files are now treated as plain text files. This commit also fixes a crash when opening `.frm` files. `m_form_inner_container` was never instantiated, and caused a null pointer dereference.
This commit is contained in:
parent
e1ff30a360
commit
ba4d367dea
Notes:
sideshowbarker
2024-07-18 10:31:32 +09:00
Author: https://github.com/ebiederstadt
Commit: ba4d367dea
Pull-request: https://github.com/SerenityOS/serenity/pull/8412
2 changed files with 1 additions and 10 deletions
|
@ -268,11 +268,7 @@ bool HackStudioWidget::open_file(const String& full_filename)
|
|||
current_editor().vertical_scrollbar().set_value(new_project_file->vertical_scroll_value());
|
||||
current_editor().set_editing_engine(make<GUI::RegularEditingEngine>());
|
||||
|
||||
if (filename.ends_with(".frm")) {
|
||||
set_edit_mode(EditMode::Form);
|
||||
} else {
|
||||
set_edit_mode(EditMode::Text);
|
||||
}
|
||||
set_edit_mode(EditMode::Text);
|
||||
|
||||
String relative_file_path = filename;
|
||||
if (filename.starts_with(m_project->root_path()))
|
||||
|
@ -302,8 +298,6 @@ void HackStudioWidget::set_edit_mode(EditMode mode)
|
|||
{
|
||||
if (mode == EditMode::Text) {
|
||||
m_right_hand_stack->set_active_widget(m_editors_splitter);
|
||||
} else if (mode == EditMode::Form) {
|
||||
m_right_hand_stack->set_active_widget(m_form_inner_container);
|
||||
} else if (mode == EditMode::Diff) {
|
||||
m_right_hand_stack->set_active_widget(m_diff_viewer);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue