Commit bfcc5f91 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Add lock guide action in new guides list widget, with tooltip info

parent 685c75ce
......@@ -1794,6 +1794,9 @@ void MainWindow::setupActions()
addAction(QStringLiteral("lock_guides"), i18n("Guides Locked"), this, SLOT(slotLockGuides(bool)), QIcon::fromTheme(QStringLiteral("kdenlive-lock")));
lockGuides->setCheckable(true);
lockGuides->setChecked(KdenliveSettings::lockedGuides());
lockGuides->setToolTip(i18n("Lock guides"));
lockGuides->setWhatsThis(
xi18nc("@info:whatsthis", "Lock guides. When locked, the guides won't move when using the spacer tool or inserting/removing blank in tracks."));
addAction(QStringLiteral("delete_all_guides"), i18n("Delete All Guides"), this, SLOT(slotDeleteAllGuides()),
QIcon::fromTheme(QStringLiteral("edit-delete")));
......
......@@ -277,6 +277,7 @@ GuidesList::~GuidesList() = default;
void GuidesList::setClipMarkerModel(std::shared_ptr<ProjectClip> clip)
{
m_markerMode = true;
guides_lock->setVisible(false);
if (clip == m_clip) {
return;
}
......@@ -316,6 +317,11 @@ void GuidesList::setModel(std::weak_ptr<MarkerListModel> model, std::shared_ptr<
m_model = std::move(model);
setEnabled(true);
guideslist_label->setText(i18n("Timeline Guides"));
if (!guides_lock->defaultAction()) {
QAction *action = pCore->window()->actionCollection()->action("lock_guides");
guides_lock->setDefaultAction(action);
}
guides_lock->setVisible(true);
m_sortModel = viewModel.get();
m_proxy->setSourceModel(m_sortModel);
guides_list->setModel(m_proxy);
......
......@@ -74,6 +74,19 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="guides_lock">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
......@@ -153,16 +166,16 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KSqueezedTextLabel</class>
<extends>QLabel</extends>
<header>ksqueezedtextlabel.h</header>
</customwidget>
<customwidget>
<class>MarkerCategoryButton</class>
<extends>QToolButton</extends>
<header>widgets/markercategorybutton.h</header>
</customwidget>
<customwidget>
<class>KSqueezedTextLabel</class>
<extends>QLabel</extends>
<header>ksqueezedtextlabel.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>filter_line</tabstop>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment