FIX:disable rename except picture type

Change-Id: I69ec39d2e3066102f7116bb17af8e26120af237d
This commit is contained in:
tao wang 2022-08-31 09:56:09 +08:00 committed by Lane.Wei
parent 1c7b183035
commit 8eb9d6a863

View file

@ -239,7 +239,12 @@ void AuFile::PaintForeground(wxDC &dc)
dc.DrawText(m_add_file, pos); dc.DrawText(m_add_file, pos);
return; return;
} }
if (m_type == MODEL_PICTURE) {
dc.DrawBitmap(m_file_edit_mask.bmp(), 0, size.y - m_file_edit_mask.GetBmpSize().y); dc.DrawBitmap(m_file_edit_mask.bmp(), 0, size.y - m_file_edit_mask.GetBmpSize().y);
}
dc.SetFont(Label::Body_14); dc.SetFont(Label::Body_14);
dc.SetTextForeground(*wxWHITE); dc.SetTextForeground(*wxWHITE);
if (m_type == MODEL_PICTURE) { if (m_type == MODEL_PICTURE) {
@ -266,11 +271,11 @@ void AuFile::PaintForeground(wxDC &dc)
dc.DrawRectangle(pos.x, pos.y, 2, FromDIP(30)); dc.DrawRectangle(pos.x, pos.y, 2, FromDIP(30));
} else { } else {
// right text // right text
auto sizet = dc.GetTextExtent(cover_text_right); /* auto sizet = dc.GetTextExtent(cover_text_right);
auto pos = wxPoint(0, 0); auto pos = wxPoint(0, 0);
pos.x = (size.x - sizet.x) / 2; pos.x = (size.x - sizet.x) / 2;
pos.y = (size.y - (m_file_edit_mask.GetBmpSize().y + sizet.y) / 2); pos.y = (size.y - (m_file_edit_mask.GetBmpSize().y + sizet.y) / 2);
dc.DrawText(cover_text_right, pos); dc.DrawText(cover_text_right, pos);*/
} }
} }
@ -409,8 +414,8 @@ void AuFile::on_mouse_left_up(wxMouseEvent &evt)
if (pos.x > cover_left && pos.x < cover_right && pos.y > cover_top && pos.y < cover_bottom) { if (pos.x > cover_left && pos.x < cover_right && pos.y > cover_top && pos.y < cover_bottom) {
if(m_type == MODEL_PICTURE) if(m_type == MODEL_PICTURE)
on_set_cover(); on_set_cover();
else /* else
on_set_rename(); on_set_rename();*/
return; return;
} }