mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
Merge branch 'tanaxiusi-master'
This commit is contained in:
commit
a566ea64be
@ -489,25 +489,28 @@ bool ContainerWidget::restoreState(const QByteArray& data)
|
||||
int cnt = 0;
|
||||
in >> cnt;
|
||||
|
||||
// Create dummy section, required to call hideSectionContent() later.
|
||||
SectionWidget* sw = new SectionWidget(this);
|
||||
sections.append(sw);
|
||||
|
||||
for (int i = 0; i < cnt; ++i)
|
||||
if(cnt > 0)
|
||||
{
|
||||
QString uname;
|
||||
in >> uname;
|
||||
// Create dummy section, required to call hideSectionContent() later.
|
||||
SectionWidget* sw = new SectionWidget(this);
|
||||
sections.append(sw);
|
||||
|
||||
const SectionContent::RefPtr sc = SCLookupMapByName(this).value(uname);
|
||||
if (!sc)
|
||||
continue;
|
||||
for (int i = 0; i < cnt; ++i)
|
||||
{
|
||||
QString uname;
|
||||
in >> uname;
|
||||
|
||||
InternalContentData data;
|
||||
if (!takeContent(sc, data))
|
||||
qFatal("This should never happen!!!");
|
||||
const SectionContent::RefPtr sc = SCLookupMapByName(this).value(uname);
|
||||
if (!sc)
|
||||
continue;
|
||||
|
||||
sw->addContent(data, false);
|
||||
contentsToHide.append(sc);
|
||||
InternalContentData data;
|
||||
if (!takeContent(sc, data))
|
||||
qFatal("This should never happen!!!");
|
||||
|
||||
sw->addContent(data, false);
|
||||
contentsToHide.append(sc);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mode == 1)
|
||||
|
@ -189,7 +189,7 @@ void SectionTitleWidget::mouseMoveEvent(QMouseEvent* ev)
|
||||
SectionWidget* section = NULL;
|
||||
|
||||
// Move already existing FloatingWidget
|
||||
if (_fw)
|
||||
if (_fw && (ev->buttons() & Qt::LeftButton))
|
||||
{
|
||||
const QPoint moveToPos = ev->globalPos() - (_dragStartPos + QPoint(ADS_WINDOW_FRAME_BORDER_WIDTH, ADS_WINDOW_FRAME_BORDER_WIDTH));
|
||||
_fw->move(moveToPos);
|
||||
|
Loading…
Reference in New Issue
Block a user