fix: pasted files selection interaction
This commit is contained in:
parent
9c5b3bc3cd
commit
3a062c3792
4 changed files with 10 additions and 6 deletions
2
main.cpp
2
main.cpp
|
@ -39,7 +39,7 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
|
||||
// Register QML Type.
|
||||
|
|
|
@ -113,7 +113,7 @@ FolderModel::FolderModel(QObject *parent)
|
|||
m_showHiddenFiles = settings.value("showHiddenFiles", false).toBool();
|
||||
|
||||
m_updateNeedSelectTimer->setSingleShot(true);
|
||||
m_updateNeedSelectTimer->setInterval(500);
|
||||
m_updateNeedSelectTimer->setInterval(50);
|
||||
connect(m_updateNeedSelectTimer, &QTimer::timeout, this, &FolderModel::updateNeedSelectUrls);
|
||||
|
||||
m_dirLister = new DirLister(this);
|
||||
|
@ -1596,7 +1596,8 @@ void FolderModel::onRowsInserted(const QModelIndex &parent, int first, int last)
|
|||
}
|
||||
}
|
||||
|
||||
QTimer::singleShot(0, this, [=] {
|
||||
// 新建文件夹需要先选择后再发送请求
|
||||
QTimer::singleShot(m_updateNeedSelectTimer->interval() + 10, this, [=] {
|
||||
if (changeIdx.isValid()) {
|
||||
setSelected(changeIdx.row());
|
||||
emit requestRename();
|
||||
|
@ -1621,7 +1622,9 @@ void FolderModel::updateNeedSelectUrls()
|
|||
if (!idx.isValid())
|
||||
continue;
|
||||
|
||||
needSelectList.append(idx);
|
||||
const QModelIndex &sourceIdx = mapFromSource(idx);
|
||||
|
||||
needSelectList.append(sourceIdx);
|
||||
}
|
||||
|
||||
m_needSelectUrls.clear();
|
||||
|
|
|
@ -38,8 +38,8 @@ FishUI.Window {
|
|||
width: contentWidth
|
||||
height: contentHeight
|
||||
|
||||
x: Screen.virtualX + (Screen.width - contentWidth) / 2
|
||||
y: Screen.virtualY + (Screen.height - contentHeight) / 2
|
||||
// x: Screen.virtualX + (Screen.width - contentWidth) / 2
|
||||
// y: Screen.virtualY + (Screen.height - contentHeight) / 2
|
||||
|
||||
minimumWidth: contentWidth
|
||||
minimumHeight: contentHeight
|
||||
|
|
|
@ -34,6 +34,7 @@ FishUI.Window {
|
|||
visible: true
|
||||
title: qsTr("File Manager")
|
||||
|
||||
background.opacity: 1
|
||||
header.height: 36 + FishUI.Units.largeSpacing
|
||||
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
|
||||
|
|
Loading…
Reference in a new issue