Changeset View
Changeset View
Standalone View
Standalone View
plugins/projectmanagerview/projectmanagerview.cpp
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | 76 | { | |||
---|---|---|---|---|---|
135 | selectionChanged(); | 135 | selectionChanged(); | ||
136 | 136 | | |||
137 | //Update the "sync" button after the initialization has completed, to see whether there already is some open documents | 137 | //Update the "sync" button after the initialization has completed, to see whether there already is some open documents | ||
138 | QMetaObject::invokeMethod(this, "updateSyncAction", Qt::QueuedConnection); | 138 | QMetaObject::invokeMethod(this, "updateSyncAction", Qt::QueuedConnection); | ||
139 | 139 | | |||
140 | // Need to set this to get horizontal scrollbar. Also needs to be done after | 140 | // Need to set this to get horizontal scrollbar. Also needs to be done after | ||
141 | // the setModel call | 141 | // the setModel call | ||
142 | m_ui->projectTreeView->header()->setSectionResizeMode( QHeaderView::ResizeToContents ); | 142 | m_ui->projectTreeView->header()->setSectionResizeMode( QHeaderView::ResizeToContents ); | ||
143 | m_ui->projectTreeView->header()->setStretchLastSection(false); | ||||
143 | } | 144 | } | ||
144 | 145 | | |||
145 | bool ProjectManagerView::eventFilter(QObject* obj, QEvent* event) | 146 | bool ProjectManagerView::eventFilter(QObject* obj, QEvent* event) | ||
146 | { | 147 | { | ||
147 | if (obj == m_ui->projectTreeView) { | 148 | if (obj == m_ui->projectTreeView) { | ||
148 | if (event->type() == QEvent::KeyRelease) { | 149 | if (event->type() == QEvent::KeyRelease) { | ||
149 | QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); | 150 | QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); | ||
150 | if (keyEvent->key() == Qt::Key_Delete && keyEvent->modifiers() == Qt::NoModifier) { | 151 | if (keyEvent->key() == Qt::Key_Delete && keyEvent->modifiers() == Qt::NoModifier) { | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |