mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
HexEditor: Store annotations in a Model
A model is necessary for displaying a list of them in the UI. We might as well make that their home.
This commit is contained in:
parent
a54952795a
commit
8cac2e89a9
8 changed files with 157 additions and 46 deletions
|
@ -104,9 +104,11 @@ EditAnnotationDialog::EditAnnotationDialog(GUI::Window* parent_window, NonnullRe
|
|||
};
|
||||
if (m_annotation.has_value()) {
|
||||
*m_annotation = move(result);
|
||||
if (m_document)
|
||||
m_document->annotations().invalidate();
|
||||
} else {
|
||||
if (m_document)
|
||||
m_document->add_annotation(result);
|
||||
m_document->annotations().add_annotation(result);
|
||||
}
|
||||
s_most_recent_color = m_background_color->color();
|
||||
done(ExecResult::OK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue