Remove the unsupported Brush tool warning dialog now that raster performance is improved
This commit is contained in:
parent
35ab266bbb
commit
b348fabfd2
|
|
@ -630,8 +630,8 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||||
NodeInput::value(TaggedValue::VectorData(VectorDataTable::default()), true),
|
NodeInput::value(TaggedValue::VectorData(VectorDataTable::default()), true),
|
||||||
NodeInput::value(
|
NodeInput::value(
|
||||||
TaggedValue::Footprint(Footprint {
|
TaggedValue::Footprint(Footprint {
|
||||||
transform: DAffine2::from_scale_angle_translation(DVec2::new(100., 100.), 0., DVec2::new(0., 0.)),
|
transform: DAffine2::from_scale_angle_translation(DVec2::new(1000., 1000.), 0., DVec2::new(0., 0.)),
|
||||||
resolution: UVec2::new(100, 100),
|
resolution: UVec2::new(1000, 1000),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
false,
|
false,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ pub struct BrushTool {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BrushOptions {
|
pub struct BrushOptions {
|
||||||
legacy_warning_was_shown: bool,
|
|
||||||
diameter: f64,
|
diameter: f64,
|
||||||
hardness: f64,
|
hardness: f64,
|
||||||
flow: f64,
|
flow: f64,
|
||||||
|
|
@ -41,7 +40,6 @@ pub struct BrushOptions {
|
||||||
impl Default for BrushOptions {
|
impl Default for BrushOptions {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
legacy_warning_was_shown: false,
|
|
||||||
diameter: DEFAULT_BRUSH_SIZE,
|
diameter: DEFAULT_BRUSH_SIZE,
|
||||||
hardness: 0.,
|
hardness: 0.,
|
||||||
flow: 100.,
|
flow: 100.,
|
||||||
|
|
@ -79,7 +77,6 @@ pub enum BrushToolMessageOptionsUpdate {
|
||||||
Hardness(f64),
|
Hardness(f64),
|
||||||
Spacing(f64),
|
Spacing(f64),
|
||||||
WorkingColors(Option<Color>, Option<Color>),
|
WorkingColors(Option<Color>, Option<Color>),
|
||||||
NoDisplayLegacyWarning,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||||
|
|
@ -224,7 +221,6 @@ impl<'a> MessageHandler<ToolMessage, &mut ToolActionMessageContext<'a>> for Brus
|
||||||
self.options.color.primary_working_color = primary;
|
self.options.color.primary_working_color = primary;
|
||||||
self.options.color.secondary_working_color = secondary;
|
self.options.color.secondary_working_color = secondary;
|
||||||
}
|
}
|
||||||
BrushToolMessageOptionsUpdate::NoDisplayLegacyWarning => self.options.legacy_warning_was_shown = true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.send_layout(responses, LayoutTarget::ToolOptions);
|
self.send_layout(responses, LayoutTarget::ToolOptions);
|
||||||
|
|
@ -322,20 +318,6 @@ impl Fsm for BrushToolFsmState {
|
||||||
document, global_tool_data, input, ..
|
document, global_tool_data, input, ..
|
||||||
} = tool_action_data;
|
} = tool_action_data;
|
||||||
|
|
||||||
if !tool_options.legacy_warning_was_shown {
|
|
||||||
responses.add(DialogMessage::DisplayDialogError {
|
|
||||||
title: "Unsupported tool".into(),
|
|
||||||
description: "
|
|
||||||
The current Brush tool is a legacy feature with\n\
|
|
||||||
significant quality and performance limitations.\n\
|
|
||||||
It will be replaced soon by a new implementation.\n\
|
|
||||||
"
|
|
||||||
.trim()
|
|
||||||
.into(),
|
|
||||||
});
|
|
||||||
responses.add(BrushToolMessage::UpdateOptions(BrushToolMessageOptionsUpdate::NoDisplayLegacyWarning));
|
|
||||||
}
|
|
||||||
|
|
||||||
let ToolMessage::Brush(event) = event else { return self };
|
let ToolMessage::Brush(event) = event else { return self };
|
||||||
match (self, event) {
|
match (self, event) {
|
||||||
(BrushToolFsmState::Ready, BrushToolMessage::DragStart) => {
|
(BrushToolFsmState::Ready, BrushToolMessage::DragStart) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue