mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 10:48:12 +08:00
Integrate document-format storage into the editor (#4265)
* Integrate document-format storage into the editor * Address review feedback: drop redundant clones and dedupe metadata traversal * Extract DocumentHistory and move storage-metadata tests to their own file * Extract storage diffing/IO, gate validation and .gdd save behind preferences, restructure tests * Address PR review: save-format/path consistency, autosave persistence, and view-settings/diff fixes * Skip storage remount on .gdd open and split value/timestamp drift in attribute diff * Rename storage tests module and surface .gdd open failures with per-resource diff detail * Add debug-menu toggle to hide the storage preferences section * Hopefully fix async tests * Shorten comments * Fix tests * Review * Review * Review * Block on future mesages in tests * Review * Shorten comments --------- Co-authored-by: Timon <me@timon.zip>
This commit is contained in:
@@ -89,9 +89,10 @@ const DEBUG_MESSAGE_BLOCK_LIST: &[MessageDiscriminant] = &[
|
||||
const DEBUG_MESSAGE_ENDING_BLOCK_LIST: &[&str] = &["PointerMove", "PointerOutsideViewport", "Overlays", "Draw", "CurrentTime", "Time"];
|
||||
|
||||
impl Dispatcher {
|
||||
pub fn new(resource_storage: Arc<dyn ResourceStorage>) -> Self {
|
||||
pub fn new(resource_storage: Arc<dyn ResourceStorage>, working_copy_root: Option<std::path::PathBuf>) -> Self {
|
||||
let mut s = Self::default();
|
||||
s.message_handlers.resource_storage_message_handler = ResourceStorageMessageHandler::new(resource_storage);
|
||||
s.message_handlers.portfolio_message_handler.set_working_copy_root(working_copy_root);
|
||||
s
|
||||
}
|
||||
|
||||
@@ -271,6 +272,7 @@ impl Dispatcher {
|
||||
menu_bar_message_handler.properties_panel_open = layout.is_panel_present(PanelType::Properties);
|
||||
menu_bar_message_handler.message_logging_verbosity = self.message_handlers.debug_message_handler.message_logging_verbosity;
|
||||
menu_bar_message_handler.reset_node_definitions_on_open = self.message_handlers.portfolio_message_handler.reset_node_definitions_on_open;
|
||||
menu_bar_message_handler.show_storage_preferences = self.message_handlers.preferences_message_handler.show_storage_preferences;
|
||||
|
||||
if let Some(document) = self
|
||||
.message_handlers
|
||||
|
||||
Reference in New Issue
Block a user