Shift keeps moved pixels on a line; Ctrl+A selects the canvas from the Layers panel (13.10)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 14:35:13 -04:00
1 parent 765e071c0c
commit 51e373af4c
6 files changed
+54 -32

No files matched your search

-12
View File
@@ -2,20 +2,10 @@
#include "IO/RecentProjects.h"
#include "Logging.h"
#include "UI/KeyboardShortcuts.h"
#include "UI/NativeLayerList.h"
#include <QApplication>
#include <QMenu>
namespace {
// The layer list holding the keys, as Swift's table.
NativeLayerList *focusedList()
{
for (QWidget *widget = QApplication::focusWidget(); widget; widget = widget->parentWidget())
if (auto *list = qobject_cast<NativeLayerList *>(widget))
return list;
return nullptr;
}
// An entry's name: Hue/Saturation is newHueSaturationAdjustment.
QString adjustmentName(AdjustmentKind kind)
{
@@ -186,8 +176,6 @@ CompositorMenus::CompositorMenus(ProjectWorkspace &workspace, QMenuBar &bar, QWi
m_field->selectAll();
else if (InlineTextEditor *text = typedText())
text->selectAll();
else if (NativeLayerList *list = focusedList())
list->selectAllRows();
else
session().selectAll();
});
-10
View File
@@ -261,13 +261,3 @@ void NativeLayerList::changeEvent(QEvent *event)
if (event->type() == QEvent::PaletteChange)
QMetaObject::invokeMethod(this, &NativeLayerList::update, Qt::QueuedConnection);
}
void NativeLayerList::selectAllRows()
{
if (m_rows.empty())
return;
QSet<QUuid> ids;
for (const ImageLayer &row : m_rows)
ids.insert(row.id);
m_session.selectLayers(ids, m_rows.front().id);
}
-2
View File
@@ -215,8 +215,6 @@ public:
QString dragToken() const { return m_dragToken; }
EditorSession &session() const { return m_session; }
// The table's Select All: every row, the top one primary.
void selectAllRows();
void update();
std::vector<LayerCell *> cells() const { return m_cells; }
// The row under a point of this list, or -1.