diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui index 68ea05e..f824e9b 100644 --- a/Source/Fractorium/Fractorium.ui +++ b/Source/Fractorium/Fractorium.ui @@ -8489,7 +8489,7 @@ Add co&py of flame - Add a copy of the current flame to the end of the current file + <html><head/><body><p>Add a copy of the current flame to the position after it</p></body></html> Ctrl+J diff --git a/Source/Fractorium/FractoriumLibrary.cpp b/Source/Fractorium/FractoriumLibrary.cpp index c6f75f2..a761219 100644 --- a/Source/Fractorium/FractoriumLibrary.cpp +++ b/Source/Fractorium/FractoriumLibrary.cpp @@ -69,23 +69,32 @@ void Fractorium::InitLibraryUI() ui.SequenceAnimationFpsSpinBox->setValue(m_Settings->AnimationFps()); } - /// /// Select the item in the library tree specified by the passed in index. /// /// The 0-based index of the item in the library tree to select void Fractorium::SelectLibraryItem(size_t index) { + EmberTreeWidgetItemBase* item = nullptr; + if (const auto top = ui.LibraryTree->topLevelItem(0)) { for (int i = 0; i < top->childCount(); i++) { if (auto emberItem = dynamic_cast(top->child(i))) { - emberItem->setSelected(i == index); + auto b = i == index; + + if (b) + item = emberItem; + + emberItem->setSelected(b); emberItem->setCheckState(NAME_COL, i == index ? Qt::Checked : Qt::Unchecked); } } + + if (item) + ui.LibraryTree->scrollToItem(item, QAbstractItemView::EnsureVisible); } } @@ -307,7 +316,7 @@ void FractoriumEmberController::EmberTreeItemChanged(QTreeWidgetItem* item, i if (text != "") { m_EmberFile.m_Filename = text; - m_LastSaveAll = "";//Reset will force the dialog to show on the next save all since the user probably wants a different name. + //m_LastSaveAll = "";//Reset will force the dialog to show on the next save all since the user probably wants a different name. } } }