You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Remember frames when selecting SpriteFrame frames
This commit is contained in:
@@ -525,6 +525,7 @@ void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
|
||||
split_sheet_offset_x->set_max(size.x);
|
||||
split_sheet_offset_y->set_max(size.y);
|
||||
|
||||
if (size != previous_texture_size) {
|
||||
// Different texture, reset to 4x4.
|
||||
dominant_param = PARAM_FRAME_COUNT;
|
||||
updating_split_settings = true;
|
||||
@@ -537,6 +538,8 @@ void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
|
||||
split_sheet_offset_x->set_value(0);
|
||||
split_sheet_offset_y->set_value(0);
|
||||
updating_split_settings = false;
|
||||
}
|
||||
previous_texture_size = size;
|
||||
|
||||
// Reset zoom.
|
||||
_sheet_zoom_reset();
|
||||
|
||||
@@ -167,6 +167,8 @@ class SpriteFramesEditor : public HSplitContainer {
|
||||
bool frames_need_sort = false;
|
||||
int last_frame_selected = 0;
|
||||
|
||||
Size2i previous_texture_size;
|
||||
|
||||
float scale_ratio;
|
||||
int thumbnail_default_size;
|
||||
float thumbnail_zoom;
|
||||
|
||||
Reference in New Issue
Block a user