diff options
author | Florian Jung <flo@windfisch.org> | 2011-12-14 15:08:02 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-12-14 15:08:02 +0000 |
commit | c36a5508aa42e596b005425208054af9a60734b4 (patch) | |
tree | fde0504e0c25b8f39ed6f5f7f7332943e4a95c7f /muse2/muse/cobject.cpp | |
parent | 42126f3b398802eb24c8d9acd2591ef4dbe7257d (diff) |
pulled fixes from release into trunk
Diffstat (limited to 'muse2/muse/cobject.cpp')
-rw-r--r-- | muse2/muse/cobject.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp index 80fc7eae..50586d45 100644 --- a/muse2/muse/cobject.cpp +++ b/muse2/muse/cobject.cpp @@ -50,7 +50,7 @@ bool TopWin::initInited=false; TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlags f) : QMainWindow(parent, f) { - _isDeleting = false; + _isDeleting = false; if (initInited==false) initConfiguration(); @@ -78,7 +78,10 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag mdisubwin=NULL; _sharesToolsAndMenu=_defaultSubwin[_type] ? _sharesWhenSubwin[_type] : _sharesWhenFree[_type]; if (_defaultSubwin[_type]) + { setIsMdiWin(true); + _savedToolbarState=_toolbarNonsharedInit[_type]; + } if (_sharesToolsAndMenu) menuBar()->hide(); @@ -125,7 +128,11 @@ void TopWin::readStatus(MusECore::Xml& xml) if (!sharesToolsAndMenu()) { if (!restoreState(QByteArray::fromHex(xml.parse1().toAscii()))) - fprintf(stderr,"ERROR: couldn't restore toolbars. however, this is not really a problem.\n"); + { + fprintf(stderr,"ERROR: couldn't restore toolbars. trying default configuration...\n"); + if (!restoreState(_toolbarNonsharedInit[_type])) + fprintf(stderr,"ERROR: couldn't restore default toolbars. this is not really a problem.\n"); + } } else { @@ -565,4 +572,15 @@ void TopWin::resize(const QSize& s) resize(s.width(), s.height()); } +TopWin* ToplevelList::findType(TopWin::ToplevelType type) const +{ + for (ciToplevel i = begin(); i != end(); ++i) + { + if((*i)->type() == type) + return (*i); + } + return 0; +} + + } // namespace MusEGui |