fix: crash when switching view
This commit is contained in:
parent
c026d3a844
commit
3dd4433645
3 changed files with 9 additions and 4 deletions
|
@ -32,13 +32,14 @@ ShortCut::ShortCut(QObject *parent)
|
|||
|
||||
void ShortCut::install(QObject *target)
|
||||
{
|
||||
if (m_object) {
|
||||
m_object->removeEventFilter(this);
|
||||
}
|
||||
// No need to remove, because memory space is automatically freed in qml.
|
||||
// if (m_object) {
|
||||
// m_object->removeEventFilter(this);
|
||||
// }
|
||||
|
||||
if (target) {
|
||||
target->installEventFilter(this);
|
||||
m_object = target;
|
||||
// m_object = target;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ import FishUI 1.0 as FishUI
|
|||
GridView {
|
||||
id: control
|
||||
|
||||
objectName: "FolderGridView"
|
||||
|
||||
property bool isDesktopView: false
|
||||
|
||||
property Item rubberBand: null
|
||||
|
|
|
@ -26,6 +26,8 @@ import Cutefish.DragDrop 1.0 as DragDrop
|
|||
ListView {
|
||||
id: control
|
||||
|
||||
objectName: "FolderListView"
|
||||
|
||||
property Item rubberBand: null
|
||||
property Item hoveredItem: null
|
||||
property Item pressedItem: null
|
||||
|
|
Loading…
Reference in a new issue