[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform/sublime
From: Hamish Rodda <rodda () kde ! org>
Date: 2008-04-18 9:23:27
Message-ID: 1208510607.396391.19821.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 798415 by rodda:
Intractable focus problems mean the no_splitters_ui branch is likely not to see the \
light of day
Remove the classes for this
Port my fix to re-enable non-anchored tool views disappearing when the editor gets \
focus.
M +17 -10 ideal.cpp
M +2 -0 ideal.h
D idealcentrallayout.cpp
D idealcentrallayout.h
D idealcentralwidget.cpp
D idealcentralwidget.h
--- trunk/KDE/kdevplatform/sublime/ideal.cpp #798414:798415
@@ -421,6 +421,7 @@
IdealMainWidget::IdealMainWidget(MainWindow* parent, KActionCollection* ac)
: QWidget(parent)
+ , m_centralWidgetFocusing(false)
{
leftBarWidget = new IdealButtonBarWidget(Qt::LeftDockWidgetArea);
leftBarWidget->hide();
@@ -573,9 +574,13 @@
void IdealMainWidget::centralWidgetFocused()
{
+ m_centralWidgetFocusing = true;
+
for (IdealMainLayout::Role role = IdealMainLayout::Left; role <= \
IdealMainLayout::Top; role = static_cast<IdealMainLayout::Role>(role + 1)) if \
(!m_mainLayout->isAreaAnchored(role)) actionForRole(role)->setChecked(false);
+
+ m_centralWidgetFocusing = false;
}
void IdealMainWidget::hideAllDocks()
@@ -790,18 +795,20 @@
void IdealMainWidget::showDock(IdealMainLayout::Role role, bool show)
{
// If the dock is shown but not focused, first focus it, a second press of the \
shortcut will hide it
- if (IdealDockWidget* widget = mainLayout()->lastDockWidget(role)) {
- if (widget->isVisible() && !widget->hasFocus()) {
- widget->setFocus(Qt::ShortcutFocusReason);
+ if (!m_centralWidgetFocusing) {
+ if (IdealDockWidget* widget = mainLayout()->lastDockWidget(role)) {
+ if (widget->isVisible() && !widget->hasFocus()) {
+ widget->setFocus(Qt::ShortcutFocusReason);
- // re-sync action state given we may have asked for the dock to be \
hidden
- KAction* action = actionForRole(role);
- if (!action->isChecked()) {
- action->blockSignals(true);
- action->setChecked(true);
- action->blockSignals(false);
+ // re-sync action state given we may have asked for the dock to be \
hidden + KAction* action = actionForRole(role);
+ if (!action->isChecked()) {
+ action->blockSignals(true);
+ action->setChecked(true);
+ action->blockSignals(false);
+ }
+ return;
}
- return;
}
}
--- trunk/KDE/kdevplatform/sublime/ideal.h #798414:798415
@@ -250,6 +250,8 @@
/** Map from IdealDockWidget to an action that shows/hides
that IdealDockWidget. */
QMap<IdealDockWidget*, QAction*> m_dockwidget_to_action;
+
+ bool m_centralWidgetFocusing;
};
class IdealSplitterHandle : public QWidget
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic