sculpt: restore toggleable format button

With the move of the storage-management dialogs to the graph in Sculpt
version 20.02, the ability to unselect the buttons for destructive
storage operations such as format or expand disappeared. This patch
restores the original behavior.
This commit is contained in:
Norman Feske 2020-09-10 16:08:27 +02:00
parent f0f8d0e0ca
commit c0f9f2c6d7
2 changed files with 8 additions and 6 deletions

View File

@ -81,7 +81,7 @@ struct Sculpt::Graph : Dialog
void reset() override { }
void reset_operation()
void reset_storage_operation()
{
if (_storage_dialog.constructed())
_storage_dialog->reset_operation();

View File

@ -609,6 +609,7 @@ struct Sculpt::Main : Input_event_handler,
void cancel_format(Storage_target const &target) override
{
_storage.cancel_format(target);
_graph.reset_storage_operation();
}
void expand(Storage_target const &target) override
@ -619,6 +620,7 @@ struct Sculpt::Main : Input_event_handler,
void cancel_expand(Storage_target const &target) override
{
_storage.cancel_expand(target);
_graph.reset_storage_operation();
}
void check(Storage_target const &target) override
@ -1443,7 +1445,7 @@ void Sculpt::Main::_handle_runtime_state()
partition.check_in_progress = 0;
reconfigure_runtime = true;
_storage.dialog.reset_operation();
_graph.reset_operation();
_graph.reset_storage_operation();
}
}
@ -1463,7 +1465,7 @@ void Sculpt::Main::_handle_runtime_state()
reconfigure_runtime = true;
_storage.dialog.reset_operation();
_graph.reset_operation();
_graph.reset_storage_operation();
}
}
@ -1475,7 +1477,7 @@ void Sculpt::Main::_handle_runtime_state()
reconfigure_runtime = true;
device.rediscover();
_storage.dialog.reset_operation();
_graph.reset_operation();
_graph.reset_storage_operation();
}
}
@ -1498,7 +1500,7 @@ void Sculpt::Main::_handle_runtime_state()
device.rediscover();
reconfigure_runtime = true;
_storage.dialog.reset_operation();
_graph.reset_operation();
_graph.reset_storage_operation();
}
}
@ -1517,7 +1519,7 @@ void Sculpt::Main::_handle_runtime_state()
reconfigure_runtime = true;
_storage.dialog.reset_operation();
_graph.reset_operation();
_graph.reset_storage_operation();
}
}