mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
PixelPaint: Remove unused methods to access files directly
After transitioning to FileSystemAccessServer, some of the methods in `MainWidget` and `ProjectLoader` for opening files directly with a filename as opposed to with a file descriptor are unused. This commit removes them.
This commit is contained in:
parent
f337580191
commit
1e1e5bb5f7
4 changed files with 0 additions and 22 deletions
|
@ -719,18 +719,6 @@ void MainWidget::open_image_fd(int fd, String const& path)
|
|||
m_layer_list_widget->set_image(&image);
|
||||
}
|
||||
|
||||
void MainWidget::open_image_file(String const& path)
|
||||
{
|
||||
auto try_load = m_loader.try_load_from_path(path);
|
||||
if (try_load.is_error()) {
|
||||
GUI::MessageBox::show_error(window(), String::formatted("Unable to open file: {}", path));
|
||||
return;
|
||||
}
|
||||
auto& image = *m_loader.release_image();
|
||||
create_new_editor(image);
|
||||
m_layer_list_widget->set_image(&image);
|
||||
}
|
||||
|
||||
void MainWidget::create_default_image()
|
||||
{
|
||||
auto image = Image::try_create_with_size({ 480, 360 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue