Removed scale and rotate actions from toolbar
This commit is contained in:
parent
bbc465fdf3
commit
cda135ada7
@ -185,18 +185,6 @@ sub new {
|
||||
$self->decrease;
|
||||
};
|
||||
|
||||
my $on_action_ccw45 = sub {
|
||||
$self->rotate(45, Z, 'relative');
|
||||
};
|
||||
|
||||
my $on_action_cw45 = sub {
|
||||
$self->rotate(-45, Z, 'relative');
|
||||
};
|
||||
|
||||
my $on_action_scale = sub {
|
||||
$self->changescale(undef);
|
||||
};
|
||||
|
||||
my $on_action_split = sub {
|
||||
$self->split_object;
|
||||
};
|
||||
@ -239,9 +227,6 @@ sub new {
|
||||
Slic3r::GUI::_3DScene::register_action_arrange_callback($self->{canvas3D}, $on_action_arrange);
|
||||
Slic3r::GUI::_3DScene::register_action_more_callback($self->{canvas3D}, $on_action_more);
|
||||
Slic3r::GUI::_3DScene::register_action_fewer_callback($self->{canvas3D}, $on_action_fewer);
|
||||
Slic3r::GUI::_3DScene::register_action_ccw45_callback($self->{canvas3D}, $on_action_ccw45);
|
||||
Slic3r::GUI::_3DScene::register_action_cw45_callback($self->{canvas3D}, $on_action_cw45);
|
||||
Slic3r::GUI::_3DScene::register_action_scale_callback($self->{canvas3D}, $on_action_scale);
|
||||
Slic3r::GUI::_3DScene::register_action_split_callback($self->{canvas3D}, $on_action_split);
|
||||
Slic3r::GUI::_3DScene::register_action_cut_callback($self->{canvas3D}, $on_action_cut);
|
||||
Slic3r::GUI::_3DScene::register_action_settings_callback($self->{canvas3D}, $on_action_settings);
|
||||
@ -403,24 +388,11 @@ sub new {
|
||||
$self->{btn_send_gcode}->Hide;
|
||||
|
||||
my %icons = qw(
|
||||
add brick_add.png
|
||||
remove brick_delete.png
|
||||
reset cross.png
|
||||
arrange bricks.png
|
||||
export_gcode cog_go.png
|
||||
print arrow_up.png
|
||||
send_gcode arrow_up.png
|
||||
reslice reslice.png
|
||||
export_stl brick_go.png
|
||||
|
||||
increase add.png
|
||||
decrease delete.png
|
||||
rotate45cw arrow_rotate_clockwise.png
|
||||
rotate45ccw arrow_rotate_anticlockwise.png
|
||||
changescale arrow_out.png
|
||||
split shape_ungroup.png
|
||||
cut package.png
|
||||
settings cog.png
|
||||
);
|
||||
for (grep $self->{"btn_$_"}, keys %icons) {
|
||||
$self->{"btn_$_"}->SetBitmap(Wx::Bitmap->new(Slic3r::var($icons{$_}), wxBITMAP_TYPE_PNG));
|
||||
@ -2249,7 +2221,7 @@ sub selection_changed {
|
||||
# }
|
||||
# }
|
||||
|
||||
for my $toolbar_item (qw(delete more fewer ccw45 cw45 scale split cut settings)) {
|
||||
for my $toolbar_item (qw(delete more fewer split cut settings)) {
|
||||
Slic3r::GUI::_3DScene::enable_toolbar_item($self->{canvas3D}, $toolbar_item, $have_sel);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 20 KiB |
@ -2046,21 +2046,6 @@ void _3DScene::register_action_fewer_callback(wxGLCanvas* canvas, void* callback
|
||||
s_canvas_mgr.register_action_fewer_callback(canvas, callback);
|
||||
}
|
||||
|
||||
void _3DScene::register_action_ccw45_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
s_canvas_mgr.register_action_ccw45_callback(canvas, callback);
|
||||
}
|
||||
|
||||
void _3DScene::register_action_cw45_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
s_canvas_mgr.register_action_cw45_callback(canvas, callback);
|
||||
}
|
||||
|
||||
void _3DScene::register_action_scale_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
s_canvas_mgr.register_action_scale_callback(canvas, callback);
|
||||
}
|
||||
|
||||
void _3DScene::register_action_split_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
s_canvas_mgr.register_action_split_callback(canvas, callback);
|
||||
|
@ -550,9 +550,6 @@ public:
|
||||
static void register_action_arrange_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_more_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_fewer_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_ccw45_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_cw45_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_scale_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_split_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_cut_callback(wxGLCanvas* canvas, void* callback);
|
||||
static void register_action_settings_callback(wxGLCanvas* canvas, void* callback);
|
||||
|
@ -2720,24 +2720,6 @@ void GLCanvas3D::register_action_fewer_callback(void* callback)
|
||||
m_action_fewer_callback.register_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3D::register_action_ccw45_callback(void* callback)
|
||||
{
|
||||
if (callback != nullptr)
|
||||
m_action_ccw45_callback.register_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3D::register_action_cw45_callback(void* callback)
|
||||
{
|
||||
if (callback != nullptr)
|
||||
m_action_cw45_callback.register_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3D::register_action_scale_callback(void* callback)
|
||||
{
|
||||
if (callback != nullptr)
|
||||
m_action_scale_callback.register_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3D::register_action_split_callback(void* callback)
|
||||
{
|
||||
if (callback != nullptr)
|
||||
@ -3459,33 +3441,9 @@ bool GLCanvas3D::_init_toolbar()
|
||||
if (!m_toolbar.add_separator())
|
||||
return false;
|
||||
|
||||
item.name = "ccw45";
|
||||
item.tooltip = GUI::L_str("Rotate CCW 45 degrees");
|
||||
item.sprite_id = 6;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_ccw45_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
item.name = "cw45";
|
||||
item.tooltip = GUI::L_str("Rotate CW 45 degrees");
|
||||
item.sprite_id = 7;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_cw45_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
item.name = "scale";
|
||||
item.tooltip = GUI::L_str("Scale...");
|
||||
item.sprite_id = 8;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_scale_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
item.name = "split";
|
||||
item.tooltip = GUI::L_str("Split");
|
||||
item.sprite_id = 9;
|
||||
item.sprite_id = 6;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_split_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
@ -3493,7 +3451,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
|
||||
item.name = "cut";
|
||||
item.tooltip = GUI::L_str("Cut...");
|
||||
item.sprite_id = 10;
|
||||
item.sprite_id = 7;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_cut_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
@ -3504,7 +3462,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
|
||||
item.name = "settings";
|
||||
item.tooltip = GUI::L_str("Settings...");
|
||||
item.sprite_id = 11;
|
||||
item.sprite_id = 8;
|
||||
item.is_toggable = false;
|
||||
item.action_callback = &m_action_settings_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
@ -3512,7 +3470,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
|
||||
item.name = "layersediting";
|
||||
item.tooltip = GUI::L_str("Layers editing");
|
||||
item.sprite_id = 12;
|
||||
item.sprite_id = 9;
|
||||
item.is_toggable = true;
|
||||
item.action_callback = &m_action_layersediting_callback;
|
||||
if (!m_toolbar.add_item(item))
|
||||
@ -3753,9 +3711,6 @@ void GLCanvas3D::_deregister_callbacks()
|
||||
m_action_arrange_callback.deregister_callback();
|
||||
m_action_more_callback.deregister_callback();
|
||||
m_action_fewer_callback.deregister_callback();
|
||||
m_action_ccw45_callback.deregister_callback();
|
||||
m_action_cw45_callback.deregister_callback();
|
||||
m_action_scale_callback.deregister_callback();
|
||||
m_action_split_callback.deregister_callback();
|
||||
m_action_cut_callback.deregister_callback();
|
||||
m_action_settings_callback.deregister_callback();
|
||||
|
@ -505,9 +505,6 @@ private:
|
||||
PerlCallback m_action_arrange_callback;
|
||||
PerlCallback m_action_more_callback;
|
||||
PerlCallback m_action_fewer_callback;
|
||||
PerlCallback m_action_ccw45_callback;
|
||||
PerlCallback m_action_cw45_callback;
|
||||
PerlCallback m_action_scale_callback;
|
||||
PerlCallback m_action_split_callback;
|
||||
PerlCallback m_action_cut_callback;
|
||||
PerlCallback m_action_settings_callback;
|
||||
@ -625,9 +622,6 @@ public:
|
||||
void register_action_arrange_callback(void* callback);
|
||||
void register_action_more_callback(void* callback);
|
||||
void register_action_fewer_callback(void* callback);
|
||||
void register_action_ccw45_callback(void* callback);
|
||||
void register_action_cw45_callback(void* callback);
|
||||
void register_action_scale_callback(void* callback);
|
||||
void register_action_split_callback(void* callback);
|
||||
void register_action_cut_callback(void* callback);
|
||||
void register_action_settings_callback(void* callback);
|
||||
|
@ -737,27 +737,6 @@ void GLCanvas3DManager::register_action_fewer_callback(wxGLCanvas* canvas, void*
|
||||
it->second->register_action_fewer_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::register_action_ccw45_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->register_action_ccw45_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::register_action_cw45_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->register_action_cw45_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::register_action_scale_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
if (it != m_canvases.end())
|
||||
it->second->register_action_scale_callback(callback);
|
||||
}
|
||||
|
||||
void GLCanvas3DManager::register_action_split_callback(wxGLCanvas* canvas, void* callback)
|
||||
{
|
||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||
|
@ -167,9 +167,6 @@ public:
|
||||
void register_action_arrange_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_more_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_fewer_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_ccw45_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_cw45_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_scale_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_split_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_cut_callback(wxGLCanvas* canvas, void* callback);
|
||||
void register_action_settings_callback(wxGLCanvas* canvas, void* callback);
|
||||
|
@ -692,27 +692,6 @@ register_action_fewer_callback(canvas, callback)
|
||||
CODE:
|
||||
_3DScene::register_action_fewer_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_action_ccw45_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
_3DScene::register_action_ccw45_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_action_cw45_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
_3DScene::register_action_cw45_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_action_scale_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
_3DScene::register_action_scale_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_action_split_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
|
Loading…
Reference in New Issue
Block a user