Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

reframe popup - select field on open

shun-iwasawab47a835c1c87
diff --git a/toonz/sources/toonz/reframepopup.cpp b/toonz/sources/toonz/reframepopup.cpp
index 7c23ef784..6b38f645f 100644
--- a/toonz/sources/toonz/reframepopup.cpp
+++ b/toonz/sources/toonz/reframepopup.cpp
@@ -61,10 +61,10 @@ ReframePopup::ReframePopup()
bool ret = true;
ret = ret && connect(m_step, SIGNAL(editingFinished()), this,
SLOT(updateBlankCellCount()));
- ret = ret && connect(m_blank, SIGNAL(editingFinished()), this,
+ ret = ret && connect(m_blank, SIGNAL(editingFinished()), this,
SLOT(updateBlankCellCount()));
- ret = ret && connect(okBtn, SIGNAL(clicked()), this, SLOT(accept()));
- ret = ret && connect(cancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
+ ret = ret && connect(okBtn, SIGNAL(clicked()), this, SLOT(accept()));
+ ret = ret && connect(cancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
assert(ret);
}
@@ -81,3 +81,7 @@ void ReframePopup::getValues(int& step, int& blank) {
step = m_step->getValue();
blank = m_blank->getValue();
}
+
+//-----------------------------------------------------------------------------
+
+void ReframePopup::showEvent(QShowEvent* event) { m_step->selectAll(); }
\ No newline at end of file
diff --git a/toonz/sources/toonz/reframepopup.h b/toonz/sources/toonz/reframepopup.h
index e02c1bc17..040541be6 100644
--- a/toonz/sources/toonz/reframepopup.h
+++ b/toonz/sources/toonz/reframepopup.h
@@ -32,6 +32,9 @@ public:
ReframePopup();
void getValues(int& step, int& blank);
+protected:
+ void showEvent(QShowEvent* event) override;
+
public slots:
void updateBlankCellCount();
};